Use gopkg managed versions of dependencies, for better go get support

This commit is contained in:
Mike Farah 2018-06-18 11:37:42 +10:00
parent ae0c042ae6
commit 6d6e476ac8
6 changed files with 22 additions and 36 deletions

View File

@ -81,7 +81,7 @@ Use "yq [command] --help" for more information about a command.
## Contribute
1. `make [local] vendor`
2. add unit tests
3. apply changes
3. apply changes (ensure that [gopkg](https://gopkg.in/) and govendor is used for package dependencies)
4. `make [local] build`
5. If required, update the user documentation
- Update README.md and/or documentation under the mkdocs folder

View File

@ -5,7 +5,7 @@ import (
"strings"
"testing"
"github.com/spf13/cobra"
"gopkg.in/spf13/cobra.v0"
)
func getRootCommand() *cobra.Command {

View File

@ -1,8 +1,6 @@
package main
import (
"github.com/imdario/mergo"
)
import "gopkg.in/imdario/mergo.v0"
func merge(dst, src interface{}, overwrite bool) error {
if overwrite {

View File

@ -9,8 +9,8 @@ import (
"strings"
"testing"
"github.com/spf13/cobra"
yaml "gopkg.in/mikefarah/yaml.v2"
"gopkg.in/spf13/cobra.v0"
)
type resulter struct {

44
vendor/vendor.json vendored
View File

@ -2,24 +2,6 @@
"comment": "",
"ignore": "test",
"package": [
{
"checksumSHA1": "66lykxpWgSmQodnhkADqn6tnroQ=",
"path": "github.com/imdario/mergo",
"revision": "e3000cb3d28c72b837601cac94debd91032d19fe",
"revisionTime": "2017-06-20T10:47:01Z"
},
{
"checksumSHA1": "40vJyUB4ezQSn/NSadsKEOrudMc=",
"path": "github.com/inconshreveable/mousetrap",
"revision": "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75",
"revisionTime": "2014-10-17T20:07:13Z"
},
{
"checksumSHA1": "BoXdUBWB8UnSlFlbnuTQaPqfCGk=",
"path": "github.com/op/go-logging",
"revision": "970db520ece77730c7e4724c61121037378659d9",
"revisionTime": "2016-03-15T20:05:05Z"
},
{
"checksumSHA1": "ljd3FhYRJ91cLZz3wsH9BQQ2JbA=",
"path": "github.com/pkg/errors",
@ -27,22 +9,28 @@
"revisionTime": "2018-03-11T21:45:15Z"
},
{
"checksumSHA1": "xPKgXygsORkmXnLdtFaFmipYKaA=",
"path": "github.com/spf13/cobra",
"revision": "b78744579491c1ceeaaa3b40205e56b0591b93a3",
"revisionTime": "2017-09-05T17:20:51Z"
},
{
"checksumSHA1": "Q52Y7t0lEtk/wcDn5q7tS7B+jqs=",
"path": "github.com/spf13/pflag",
"revision": "7aff26db30c1be810f9de5038ec5ef96ac41fd7c",
"revisionTime": "2017-08-24T17:57:12Z"
"checksumSHA1": "RwlkCZz8VFXAE4aHQQOSC0hLu5k=",
"path": "gopkg.in/imdario/mergo.v0",
"revision": "9316a62528ac99aaecb4e47eadd6dc8aa6533d58",
"revisionTime": "2018-06-08T14:01:56Z"
},
{
"checksumSHA1": "7wtGubs4v7+RZovtlmyT9KwA/gE=",
"path": "gopkg.in/mikefarah/yaml.v2",
"revision": "e175af14aaa1d0eff2ee04b691e4a4827a111416",
"revisionTime": "2018-06-13T04:05:11Z"
},
{
"checksumSHA1": "rL5r44ASTGubGW88gqQwlvVQshw=",
"path": "gopkg.in/op/go-logging.v1",
"revision": "b2cb9fa56473e98db8caba80237377e83fe44db5",
"revisionTime": "2016-02-11T21:21:56Z"
},
{
"checksumSHA1": "xsZjAbfLrXcMtY6fyQ8QC6EvJD0=",
"path": "gopkg.in/spf13/cobra.v0",
"revision": "ef82de70bb3f60c65fb8eebacbb2d122ef517385",
"revisionTime": "2018-04-27T13:45:50Z"
}
],
"rootPath": "github.com/mikefarah/yq"

4
yq.go
View File

@ -11,10 +11,10 @@ import (
"strings"
errors "github.com/pkg/errors"
"gopkg.in/spf13/cobra.v0"
logging "github.com/op/go-logging"
"github.com/spf13/cobra"
yaml "gopkg.in/mikefarah/yaml.v2"
logging "gopkg.in/op/go-logging.v1"
)
var trimOutput = true