Skip to content

Commit

Permalink
Merge pull request #6 from dims/update-travis-yaml-with-additional-ch…
Browse files Browse the repository at this point in the history
…ecks

Update .travis.yml with additional checks
  • Loading branch information
k8s-ci-robot committed Nov 2, 2018
2 parents d6591d7 + c978af5 commit 9fb50c1
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
16 changes: 11 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
language: go
dist: xenial
go:
- "1.3"
- "1.4"
- "1.10"
- 1.9.x
- 1.10.x
- 1.11.x
script:
- go test
- go build
- go get -t -v ./...
- diff -u <(echo -n) <(gofmt -d .)
- diff -u <(echo -n) <(golint $(go list -e ./...) | grep -v YAMLToJSON)
- go tool vet .
- go test -v -race ./...
install:
- go get golang.org/x/lint/golint
1 change: 1 addition & 0 deletions fields.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package yaml

import (
Expand Down
6 changes: 2 additions & 4 deletions yaml.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"gopkg.in/yaml.v2"
)

// Marshals the object into JSON then converts JSON to YAML and returns the
// Marshal marshals the object into JSON then converts JSON to YAML and returns the
// YAML.
func Marshal(o interface{}) ([]byte, error) {
j, err := json.Marshal(o)
Expand Down Expand Up @@ -78,7 +78,7 @@ func jsonUnmarshal(r io.Reader, o interface{}, opts ...JSONOpt) error {
return nil
}

// Convert JSON to YAML.
// JSONToYAML Converts JSON to YAML.
func JSONToYAML(j []byte) ([]byte, error) {
// Convert the JSON to an object.
var jsonObj interface{}
Expand Down Expand Up @@ -316,6 +316,4 @@ func convertToJSONableObject(yamlObj interface{}, jsonTarget *reflect.Value) (in
}
return yamlObj, nil
}

return nil, nil
}
2 changes: 1 addition & 1 deletion yaml_go110_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func TestUnmarshalWithTags(t *testing.T) {

}

func ExampleUnknown() {
func exampleUnknown() {
type WithTaggedField struct {
Field string `json:"field"`
}
Expand Down

0 comments on commit 9fb50c1

Please sign in to comment.