Hi!
I'm new to Go so please be patient with my question :).
I really like your approach to the problem (generating functions instead of relying on reflection). However in order to use this library within the project (created with go modules) I had to do a few tricks:
-
Clone the repo manually to $GOPATH/src/github.com/go-dash/slice
-
Add go.mod file to the root of the repo with a following content:
module github.com/go-dash/slice
-
Modify go.mod file in my project:
replace github.com/go-dash/slice v0.0.0 => ../../../github.com/go-dash/slice
require github.com/go-dash/slice v0.0.0
After that it finally worked. Are there better ways to use this library with go modules based projects?
Hi!
I'm new to Go so please be patient with my question :).
I really like your approach to the problem (generating functions instead of relying on reflection). However in order to use this library within the project (created with go modules) I had to do a few tricks:
Clone the repo manually to
$GOPATH/src/github.com/go-dash/sliceAdd
go.modfile to the root of the repo with a following content:Modify
go.modfile in my project:After that it finally worked. Are there better ways to use this library with go modules based projects?