@@ -131,13 +131,13 @@ func readConfig(stderr io.Writer, dir, filename string) (string, *config.Config,
131131 return configPath , & conf , nil
132132}
133133
134- // GenerateInputs holds in-memory config and optional file contents so generate can run
134+ // sourceFiles holds in-memory config and optional file contents so generate can run
135135// without reading from disk (e.g. in tests). For production, Generate reads from FS and
136136// fills FileContents before calling generate.
137- type GenerateInputs struct {
138- Config * config.Config
139- ConfigPath string
140- Dir string
137+ type sourceFiles struct {
138+ Config * config.Config
139+ ConfigPath string
140+ Dir string
141141 FileContents map [string ][]byte // path -> content; keys match paths used when reading (e.g. filepath.Join(dir, "schema.sql"))
142142}
143143
@@ -166,7 +166,7 @@ func Generate(ctx context.Context, dir, filename string, o *Options) (map[string
166166 return remoteGenerate (ctx , configPath , conf , dir , stderr )
167167 }
168168
169- inputs := & GenerateInputs {Config : conf , ConfigPath : configPath , Dir : dir }
169+ inputs := & sourceFiles {Config : conf , ConfigPath : configPath , Dir : dir }
170170 inputs .FileContents , err = loadFileContentsFromFS (conf , dir )
171171 if err != nil {
172172 return nil , err
@@ -176,7 +176,7 @@ func Generate(ctx context.Context, dir, filename string, o *Options) (map[string
176176
177177// generate performs codegen using in-memory inputs. It is used by Generate (with contents
178178// loaded from disk) and by tests (with pre-filled Config and FileContents, no temp files).
179- func generate (ctx context.Context , inputs * GenerateInputs , o * Options ) (map [string ]string , error ) {
179+ func generate (ctx context.Context , inputs * sourceFiles , o * Options ) (map [string ]string , error ) {
180180 g := & generator {
181181 dir : inputs .Dir ,
182182 output : map [string ]string {},
@@ -228,9 +228,9 @@ func loadFileContentsFromFS(conf *config.Config, dir string) (map[string][]byte,
228228}
229229
230230type generator struct {
231- m sync.Mutex
232- dir string
233- output map [string ]string
231+ m sync.Mutex
232+ dir string
233+ output map [string ]string
234234 codegenHandlerOverride grpc.ClientConnInterface
235235}
236236
0 commit comments