Use golint to normalize the code (#1)

This commit is contained in:
Li4n0
2021-04-21 22:08:29 +08:00
committed by GitHub
parent d4a47aebca
commit 960b2ab5ea
39 changed files with 1046 additions and 1108 deletions
+3 -3
View File
@@ -8,7 +8,7 @@ import (
"github.com/li4n0/revsuit/internal/record"
)
func formatRecordField(r record.Record,fieldFormat string) (content string) {
func formatRecordField(r record.Record, fieldFormat string) (content string) {
structType := reflect.ValueOf(r)
for i := 0; i < structType.NumField(); i++ {
structField := structType.Type().Field(i)
@@ -27,6 +27,6 @@ func formatRecordField(r record.Record,fieldFormat string) (content string) {
}
content += fmt.Sprintf(fieldFormat+"\n", strings.ToUpper(fieldName), value)
}
strings.TrimSuffix(content, "\n")
return
content = strings.TrimSuffix(content, "\n")
return content
}