Added space-delimited string list attrib type
This commit is contained in:
@ -61,6 +61,16 @@ var attribTypes = map[string]AttribTypeInfo{
|
||||
Template: simpleTemplate("float32", "strconv.FormatFloat(float64(%s), 'G', -1, 32)"),
|
||||
Imports: []string{"strconv"},
|
||||
},
|
||||
"space list": {
|
||||
Template: `func %s(value ...string) hatmill.Attrib {
|
||||
return hatmill.Attrib{
|
||||
Key: "%s",
|
||||
Value: strings.Join(value, " "),
|
||||
}
|
||||
}
|
||||
`,
|
||||
Imports: []string{"strings"},
|
||||
},
|
||||
}
|
||||
|
||||
// Def represents a top-level definition and its required imports.
|
||||
|
Reference in New Issue
Block a user