@@ -15,19 +15,10 @@ import (
15
15
"github.com/friendsofgo/errors"
16
16
"github.com/volatiletech/sqlboiler/v4/drivers"
17
17
"github.com/volatiletech/sqlboiler/v4/importers"
18
+ boiltemplates "github.com/volatiletech/sqlboiler/v4/templates"
18
19
"github.com/volatiletech/strmangle"
19
20
)
20
21
21
- const (
22
- templatesDirectory = "templates"
23
- templatesSingletonDirectory = "templates/singleton"
24
-
25
- templatesTestDirectory = "templates_test"
26
- templatesSingletonTestDirectory = "templates_test/singleton"
27
-
28
- templatesTestMainDirectory = "templates_test/main_test"
29
- )
30
-
31
22
var (
32
23
// Tags must be in a format like: json, xml, etc.
33
24
rgxValidTag = regexp .MustCompile (`[a-zA-Z_\.]+` )
@@ -49,7 +40,7 @@ type State struct {
49
40
}
50
41
51
42
// New creates a new state based off of the config
52
- func New (config * Config , templatesBuiltin fs. FS ) (* State , error ) {
43
+ func New (config * Config ) (* State , error ) {
53
44
s := & State {
54
45
Config : config ,
55
46
}
@@ -108,7 +99,7 @@ func New(config *Config, templatesBuiltin fs.FS) (*State, error) {
108
99
return nil , err
109
100
}
110
101
111
- templates , err = s .initTemplates (templatesBuiltin )
102
+ templates , err = s .initTemplates (boiltemplates . Builtin )
112
103
if err != nil {
113
104
return nil , errors .Wrap (err , "unable to initialize templates" )
114
105
}
0 commit comments