Rewrite vendor.json to more merge-friendly format
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
cmd/vendorfmt
LICENSE
README.md
format.go
format_test.go

README.md

Overview

vendorfmt rewrites a vendor/vendor.json file used by https://github.com/kardianos/govendor to a more merge friendly format.

Install

go get -u github.com/magiconair/vendorfmt/cmd/vendorfmt

Usage

# format vendor/vendor.json
$ vendorfmt

# format other files
$ vendorfmt foo/bar/vendor.json

Before

{
	"comment": "",
	"ignore": "test",
	"package": [
		{
			"path": "appengine",
			"revision": ""
		},
		{
			"path": "appengine_internal",
			"revision": ""
		},
		{
			"path": "appengine_internal/base",
			"revision": ""
		}
	]
}

After

{
	"comment": "",
	"ignore": "test",
	"package": [
		{"path":"appengine","revision":""},
		{"path":"appengine_internal","revision":""},
		{"path":"appengine_internal/base","revision":""}
	]
}