Sfoglia il codice sorgente

remove unnecessary type conversion

Roger Peppe 14 anni fa
parent
commit
dd8f49ae78
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      goyaml.go

+ 2 - 2
goyaml.go

@@ -197,9 +197,9 @@ func getStructFields(st reflect.Type) (*structFields, error) {
 			recommend := tag[:s]
 			recommend := tag[:s]
 			for _, c := range tag[s+1:] {
 			for _, c := range tag[s+1:] {
 				switch c {
 				switch c {
-				case rune('c'):
+				case 'c':
 					recommend += ",omitempty"
 					recommend += ",omitempty"
-				case rune('f'):
+				case 'f':
 					recommend += ",flow"
 					recommend += ",flow"
 				default:
 				default:
 					msg := fmt.Sprintf("Unsupported flag %q in tag %q of type %s", string([]byte{uint8(c)}), tag, st)
 					msg := fmt.Sprintf("Unsupported flag %q in tag %q of type %s", string([]byte{uint8(c)}), tag, st)