Use gopkg managed version of yaml to properly support go get

This commit is contained in:
Mike Farah 2018-06-18 11:12:52 +10:00
parent 867ec92d3a
commit ae0c042ae6
6 changed files with 8 additions and 10 deletions

View File

@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"strconv" "strconv"
"gopkg.in/yaml.v2" yaml "gopkg.in/mikefarah/yaml.v2"
) )
func entryInSlice(context yaml.MapSlice, key interface{}) *yaml.MapItem { func entryInSlice(context yaml.MapSlice, key interface{}) *yaml.MapItem {

View File

@ -5,7 +5,7 @@ import (
"sort" "sort"
"testing" "testing"
yaml "gopkg.in/yaml.v2" yaml "gopkg.in/mikefarah/yaml.v2"
) )
func TestReadMap_simple(t *testing.T) { func TestReadMap_simple(t *testing.T) {

View File

@ -5,7 +5,7 @@ import (
"fmt" "fmt"
"strconv" "strconv"
yaml "gopkg.in/yaml.v2" yaml "gopkg.in/mikefarah/yaml.v2"
) )
func jsonToString(context interface{}) (string, error) { func jsonToString(context interface{}) (string, error) {

View File

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

8
vendor/vendor.json vendored
View File

@ -39,12 +39,10 @@
"revisionTime": "2017-08-24T17:57:12Z" "revisionTime": "2017-08-24T17:57:12Z"
}, },
{ {
"checksumSHA1": "DHNYKS5T54/XOqUsFFzdZMLEnVE=", "checksumSHA1": "7wtGubs4v7+RZovtlmyT9KwA/gE=",
"origin": "github.com/mikefarah/yaml", "path": "gopkg.in/mikefarah/yaml.v2",
"path": "gopkg.in/yaml.v2",
"revision": "e175af14aaa1d0eff2ee04b691e4a4827a111416", "revision": "e175af14aaa1d0eff2ee04b691e4a4827a111416",
"revisionTime": "2018-06-13T04:05:11Z", "revisionTime": "2018-06-13T04:05:11Z"
"tree": true
} }
], ],
"rootPath": "github.com/mikefarah/yq" "rootPath": "github.com/mikefarah/yq"

2
yq.go
View File

@ -14,7 +14,7 @@ import (
logging "github.com/op/go-logging" logging "github.com/op/go-logging"
"github.com/spf13/cobra" "github.com/spf13/cobra"
yaml "gopkg.in/yaml.v2" yaml "gopkg.in/mikefarah/yaml.v2"
) )
var trimOutput = true var trimOutput = true