Robert Vollmert 11 years ago
parent
commit
b9b22c4345
2 changed files with 2 additions and 2 deletions
  1. 1 1
      encode_test.go
  2. 1 1
      yaml.go

+ 1 - 1
encode_test.go

@@ -340,7 +340,7 @@ var marshalErrorTests = []struct {
 	panic: `Duplicated key 'b' in struct struct \{ B int; .*`,
 }, {
 	value: &struct {
-		A       int
+		A int
 		B map[string]int ",inline"
 	}{1, map[string]int{"a": 2}},
 	panic: `Can't have key "a" in inlined map; conflicts with struct field`,

+ 1 - 1
yaml.go

@@ -330,7 +330,7 @@ func isZero(v reflect.Value) bool {
 		return !v.Bool()
 	case reflect.Struct:
 		vt := v.Type()
-		for i := v.NumField()-1; i >= 0; i-- {
+		for i := v.NumField() - 1; i >= 0; i-- {
 			if vt.Field(i).PkgPath != "" {
 				continue // Private field
 			}