Attrib takes Stringer instead of string

This commit is contained in:
2019-08-31 09:05:43 -06:00
parent daa401817d
commit 0e29901b4f
10 changed files with 116 additions and 94 deletions

View File

@ -29,7 +29,7 @@ func simpleTemplate(paramType, convertExpr string) string {
return fmt.Sprintf(`func %%s(value %s) hatmill.Attrib {
return hatmill.Attrib{
Key: "%%s",
Value: %s,
Value: String(%s),
}
}
`, paramType, conversion)
@ -39,7 +39,7 @@ func listTemplate(separator string) string {
return fmt.Sprintf(`func %%s(value ...string) hatmill.Attrib {
return hatmill.Attrib{
Key: "%%s",
Value: strings.Join(value, "%s"),
Value: String(strings.Join(value, "%s")),
}
}
`, separator)