dcsunny 4 년 전
부모
커밋
bb67eda74a
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      yaml.go

+ 1 - 1
yaml.go

@@ -622,7 +622,7 @@ func getStructInfo(st reflect.Type) (*structInfo, error) {
 		if tag != "" {
 			info.Key = tag
 		} else {
-			info.Key = strings.ToLower(field.Name)
+			info.Key = strings.ToLower(field.Name[0:1]) + field.Name[1:]
 		}
 
 		if _, found = fieldsMap[info.Key]; found {