1
0
mirror of https://github.com/beego/bee.git synced 2024-11-22 15:10:54 +00:00

fix map init

This commit is contained in:
LinXiaoYi 2021-05-23 22:11:48 +08:00
parent 3e3b0359c0
commit 965e4d8803

View File

@ -53,7 +53,7 @@ func (a *Annotation) Annotate(comment string) []map[string]interface{} {
kvs := strings.Split(line, " ") kvs := strings.Split(line, " ")
key := kvs[0] key := kvs[0]
values := strings.Split(strings.TrimSpace(line[len(kvs[0]):]), "\n") values := strings.Split(strings.TrimSpace(line[len(kvs[0]):]), "\n")
annotation := make(map[string]interface{}, 0) annotation := make(map[string]interface{})
annotation[key] = handleWhitespaceValues(values) annotation[key] = handleWhitespaceValues(values)
results = append(results, annotation) results = append(results, annotation)
} }