From 6d6e476ac84053d8da44a16f033cd655bf6dea01 Mon Sep 17 00:00:00 2001 From: Mike Farah Date: Mon, 18 Jun 2018 11:37:42 +1000 Subject: [PATCH] Use gopkg managed versions of dependencies, for better go get support --- README.md | 2 +- commands_test.go | 2 +- merge.go | 4 +--- utils_test.go | 2 +- vendor/vendor.json | 44 ++++++++++++++++---------------------------- yq.go | 4 ++-- 6 files changed, 22 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index 939e7f91..503be9d1 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/commands_test.go b/commands_test.go index 88b777a6..1081207a 100644 --- a/commands_test.go +++ b/commands_test.go @@ -5,7 +5,7 @@ import ( "strings" "testing" - "github.com/spf13/cobra" + "gopkg.in/spf13/cobra.v0" ) func getRootCommand() *cobra.Command { diff --git a/merge.go b/merge.go index b9c4c18e..68cbb5f8 100644 --- a/merge.go +++ b/merge.go @@ -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 { diff --git a/utils_test.go b/utils_test.go index 74ac9b0d..ffeb45ff 100644 --- a/utils_test.go +++ b/utils_test.go @@ -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 { diff --git a/vendor/vendor.json b/vendor/vendor.json index d18f52e8..79c4a93c 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -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" diff --git a/yq.go b/yq.go index 52644df7..ecf020cd 100644 --- a/yq.go +++ b/yq.go @@ -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