Skip to content
This repository was archived by the owner on Feb 26, 2019. It is now read-only.
This repository was archived by the owner on Feb 26, 2019. It is now read-only.

[feature] support local repo mirror through add "repo" into top level of vender file #480

Open
@YueHonghui

Description

@YueHonghui

We plan to use golang in our team, and want to create a local repo mirror that copy all dependencies we used in our private network. But after playing with dependency manager tools like godep and govender, we realized it is difficult work.
I suggest add "repo" into top level of vender file, to redirect all origin to repo/origin, like this:

{
    "comment": "Note the use of a non-standard crypto package.",
    "repo":"privatedomain",
    "package": [
        {
            "path": "rsc.io/pdf",
            "revision": "3a3aeae79a3ec4f6d093a6b036c24698938158f3",
            "revisionTime": "2014-09-25T17:07:18-04:00",
            "comment": "located on disk at $GOPATH/src/github.com/kardianos/mypkg/vendor/rsc.io/pdf"
        },
        {
            "path": "golang.org/x/net/context",
            "revision": "25f1feceb5e13da68a35ee552069f86d18d63fee",
            "revisionTime": "2015-04-09T05:06:17-08:00",
            "comment": "Use the 25f1 version. Located on disk at $GOPATH/src/github.com/kardianos/mypkg/vendor/golang.org/x/net/context"
        }
    ]
}

This will tell vendor tools to fetch "privatedomain/rsc.io/pdf" as "rsc.io/pdf", "privatedomain/golang.org/x/net/context" as "golang.org/x/net/context". I think this will be a great idea providing golang dependency management the ability of private mirror repo.

ps: I have posted a same issue(kardianos/govendor#155) to govender.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions