Skip to content

Compatibility with Go modules #4

@lcmen

Description

@lcmen

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:

  1. Clone the repo manually to $GOPATH/src/github.com/go-dash/slice

  2. Add go.mod file to the root of the repo with a following content:

    module github.com/go-dash/slice
    
  3. 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions