Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
/vndrPublic

Stupid vendoring tool

License

NotificationsYou must be signed in to change notification settings

LK4D4/vndr

Repository files navigation

Build Status

Vndr is simple vendoring tool, which is inspired by Docker vendor script.Vndr has next command line arguments:

  • -verbose adds additional output, helpful for debugging issues.
  • -whitelist allows you to specify several regular expressions for pathswhich willnot be cleaned in the final stage of vendoring -- this is usefulfor running tests in a vendored project or otherwise ensuring that someimportant files are retained aftervndr is done cleaning unused files fromyourvendor/ directory.
  • -strict exits with non-zero status on non-trivial warning

Installation

Execute

go get github.com/LK4D4/vndr

vendor.conf

vendor.conf is the configuration file ofvndr. It must have multiple lines,which have format:

Import path               | revision                               | Repository(optional)github.com/example/example 03a4d9dcf2f92eae8e90ed42aa2656f63fdd0b14 https://github.com/LK4D4/example.git

You can useRepository field for vendoring forks instead of original repos.This config format is also accepted bytrash.

Initialization

You can initiate your project with vendor directory andvendor.conf using commandvndr init. This will populate your vendor directory with latest versions ofall dependencies and also writevendor.conf config which you can use for changingversions later.

Updating or using existing vendor.conf

If you already havevendor.conf you can just change versions there as you like,set$GOPATH and runvndr in your repository with that file:

vndr

(Note: Your repository must be in proper place in$GOPATH, i.e.$GOPATH/src/github.com/LK4D4/vndr).

Also it's possible to vendor or update only one dependency:

vndr github.com/example/example 03a4d9dcf2f92eae8e90ed42aa2656f63fdd0b14 https://github.com/LK4D4/example.git

or

vndr github.com/example/example

to take revision and repo fromvendor.conf.

If you experience any problems, please try to runvndr -verbose.

Sometimesvndr might suggest you to change yourvendor.conf:

  • in case of duplicated or non-top packages it will write suggested file tovendor.conf.tmp, you should diff your file with it and make changes accordingly.
  • in case of unused packages it will just print warning

[8]ページ先頭

©2009-2025 Movatter.jp