Skip to content

Commit

Permalink
add inc function to templates
Browse files Browse the repository at this point in the history
  • Loading branch information
ZelvaMan committed Oct 22, 2023
1 parent 0915db5 commit 21db645
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/generator-functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ import (

func getTemplateFunctions() template.FuncMap {
return template.FuncMap{
"inc": func(n int) int {
return n + 1
},
"uCamel": func(s string) string {
return strcase.UpperCamelCase(s)
},
Expand Down

0 comments on commit 21db645

Please sign in to comment.