...
1 package postgres
2
3 type options struct {
4 applySeedModel bool
5 skipSchemaIsolation bool
6 }
7 type Option func(*options)
8
9
10 func ApplySeedModel() Option {
11 return func(o *options) {
12 o.applySeedModel = true
13 }
14 }
15
16
17
18 func SkipSchemaIsolation() Option {
19 return func(o *options) {
20 o.skipSchemaIsolation = true
21 }
22 }
23 func makeOptions(opts ...Option) *options {
24 options := &options{}
25 for _, o := range opts {
26 o(options)
27 }
28 return options
29 }
30
View as plain text