Skip to content

Commit

Permalink
Add trimPrefix template function
Browse files Browse the repository at this point in the history
  • Loading branch information
ZelvaMan committed Sep 11, 2024
1 parent eea6d86 commit ebd168a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions private/dbGen/generator-functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package dbGen

import (
"github.com/keenmate/db-gen/private/helpers"
"strings"
"text/template"
)

Expand All @@ -19,5 +20,8 @@ func getTemplateFunctions() template.FuncMap {
"snakeCased": func(s string) string {
return helpers.ToSnakeCase(s)
},
"trimPrefix": func(p string, s string) string {
return strings.TrimPrefix(s, p)
},
}
}

0 comments on commit ebd168a

Please sign in to comment.