Skip to content

Commit ae31a78

Browse files
committed
fix: Rebase on main
1 parent 436fa7f commit ae31a78

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

internal/cmd/generate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,12 @@ func Generate(ctx context.Context, e Env, dir, filename string, stderr io.Writer
109109
return nil, err
110110
}
111111

112+
base := filepath.Base(configPath)
112113
if err := config.Validate(conf); err != nil {
113114
fmt.Fprintf(stderr, "error validating %s: %s\n", base, err)
114115
return nil, err
115116
}
116117

117-
base := filepath.Base(configPath)
118118
output := map[string]string{}
119119
errored := false
120120

internal/config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ func ParseConfig(rd io.Reader) (Config, error) {
327327
}
328328
}
329329

330-
func Validate(c Config) error {
330+
func Validate(c *Config) error {
331331
for _, sql := range c.SQL {
332332
sqlGo := sql.Gen.Go
333333
if sqlGo == nil {

internal/config/config_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func TestBadConfigs(t *testing.T) {
6565
}
6666

6767
func TestInvalidConfig(t *testing.T) {
68-
err := Validate(Config{
68+
err := Validate(&Config{
6969
SQL: []SQL{{
7070
Gen: SQLGen{
7171
Go: &SQLGo{

0 commit comments

Comments
 (0)