Skip to content

Commit b29b630

Browse files
authored
Small error fix; change .tpl -> .tmpl; add struct lookup method (#3)
* tagFormat error should print tagFormat * use more standard .tmpl extension instead of .tpl
1 parent 6e6f3db commit b29b630

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func initConfig() (config, error) {
7979
switch *tagFormat {
8080
case formatAsIs, formatSnakeCase, formatCamelCase, formatPascalCase:
8181
default:
82-
return config{}, fmt.Errorf("invalid tag_format %s", *format)
82+
return config{}, fmt.Errorf("invalid tag_format %s", *tagFormat)
8383
}
8484

8585
conf := config{}

genutil.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ import (
1111
)
1212

1313
const (
14-
templateName = "output.tpl"
14+
templateName = "output.tmpl"
1515
)
1616

1717
var (
18-
//go:embed output.tpl
18+
//go:embed output.tmpl
1919
templatesFS embed.FS
2020
)
2121

File renamed without changes.

0 commit comments

Comments
 (0)