Last active
September 10, 2018 09:21
-
-
Save paultyng/7b93fc3705f1fd192abd52a7f60b7c94 to your computer and use it in GitHub Desktop.
Gopkg.lock to vendor.json - dep to govendor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# tomljson from https://github.com/pelletier/go-toml | |
tomljson Gopkg.lock \ | |
| jq '{ comment: "", ignore: "test", package: [.projects[] | . as $project | .packages[] | { path: ($project.name + if . == "." then "" else ("/" + .) end), revision: $project.revision } + if $project.version then { version: $project.version, versionExact: $project.version } else {} end], rootPath: "github.com/..." }' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment