travis: Bump to golang 1.10

This requires breaking changes in gofmt. It is hilarious that this was
changed. Oh well. This also moves to the latest stable etcd. Lastly,
this changes the `go vet` testing to test by package, since the new go
vet changed how it works and now fails without this change.
This commit is contained in:
James Shubin
2018-05-06 16:19:21 -04:00
parent 56db31ca43
commit d990d2ad86
12 changed files with 35 additions and 59 deletions

View File

@@ -170,19 +170,19 @@ func (obj *TemplateFunc) run(templateText string, vars types.Value) (string, err
// see: https://golang.org/pkg/text/template/#FuncMap for more info
// note: we can override any other functions by adding them here...
funcMap := map[string]interface{}{
//"test1": func(in interface{}) (interface{}, error) { // ok
// return fmt.Sprintf("got(%T): %+v", in, in), nil
//},
//"test2": func(in interface{}) interface{} { // NOT ok
// panic("panic") // a panic here brings down everything!
//},
//"test3": func(foo int64) (string, error) { // ok, but errors
// return "", fmt.Errorf("i am an error")
//},
//"test4": func(in1, in2 reflect.Value) (reflect.Value, error) { // ok
// s := fmt.Sprintf("got: %+v and: %+v", in1, in2)
// return reflect.ValueOf(s), nil
//},
//"test1": func(in interface{}) (interface{}, error) { // ok
// return fmt.Sprintf("got(%T): %+v", in, in), nil
//},
//"test2": func(in interface{}) interface{} { // NOT ok
// panic("panic") // a panic here brings down everything!
//},
//"test3": func(foo int64) (string, error) { // ok, but errors
// return "", fmt.Errorf("i am an error")
//},
//"test4": func(in1, in2 reflect.Value) (reflect.Value, error) { // ok
// s := fmt.Sprintf("got: %+v and: %+v", in1, in2)
// return reflect.ValueOf(s), nil
//},
}
// FIXME: should we do this once in init() instead, or in the Register