lang: funcs: funcgen: Clean up some small details

Some small changes were needed, here they are. Unfortunately this only
supports the `string` type at the moment.
This commit is contained in:
James Shubin
2019-02-21 12:58:50 -05:00
parent a0df4829a8
commit 00db953c9f
10 changed files with 19 additions and 16 deletions

2
lang/funcs/core/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
generated_funcs.go
generated_funcs_test.go

View File

@@ -1,5 +1,5 @@
# This file is to be used by github.com/purpleidea/mgmt/lang/golang2mgmt
# to generate mgmt functions
# This file is used by github.com/purpleidea/mgmt/lang/funcs/funcgen/ to
# generate mcl functions.
functions:
- mgmtName: to_upper
mgmtPackage: strings
@@ -15,7 +15,7 @@ functions:
return: [{type: string, value: "HELLO 22"}]
- mgmtName: trim
mgmtPackage: strings
help: returns a slice of the string s with all leading and trailing Unicode code points contained in cutset removed..
help: returns a slice of the string s with all leading and trailing Unicode code points contained in cutset removed.
goPackage: strings
goFunc: Trim
args: [{name: s, type: string}, {name: cutset, type: string}]