lang: funcs: Fix autogenerated comments

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
This commit is contained in:
Julien Pivotto
2019-10-30 21:51:15 +01:00
parent 0cbfaf98f3
commit 7f4ad76298

View File

@@ -227,8 +227,14 @@ func (obj *golangPackage) getHelp(function, internalName string) (string, error)
docs := strings.Split(s, " ")
docs[0] = internalName
s = strings.Join(docs, " ")
doc = doc + "// " + s + " is an autogenerated function.\n"
} else {
doc = doc + "//"
if s != "" {
doc = doc + " "
}
doc = doc + s + "\n"
}
doc = fmt.Sprintf("%s// %s is an autogenerated function.\n", doc, s)
}
}
return doc, nil