Skip to content

Commit f29e426

Browse files
authored
fix: support version 2 in error message (#1839)
1 parent e5d2708 commit f29e426

File tree

2 files changed

+2
-17
lines changed

2 files changed

+2
-17
lines changed

internal/cmd/generate.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
)
2828

2929
const errMessageNoVersion = `The configuration file must have a version number.
30-
Set the version to 1 at the top of sqlc.json:
30+
Set the version to 1 or 2 at the top of sqlc.json:
3131
3232
{
3333
"version": "1"
@@ -36,7 +36,7 @@ Set the version to 1 at the top of sqlc.json:
3636
`
3737

3838
const errMessageUnknownVersion = `The configuration file has an invalid version number.
39-
The only supported version is "1".
39+
The supported version can only be "1" or "2".
4040
`
4141

4242
const errMessageNoPackages = `No packages are configured`

internal/config/config.go

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,6 @@ import (
1010
yaml "gopkg.in/yaml.v3"
1111
)
1212

13-
const errMessageNoVersion = `The configuration file must have a version number.
14-
Set the version to 1 at the top of sqlc.json:
15-
16-
{
17-
"version": "1"
18-
...
19-
}
20-
`
21-
22-
const errMessageUnknownVersion = `The configuration file has an invalid version number.
23-
The only supported version is "1".
24-
`
25-
26-
const errMessageNoPackages = `No packages are configured`
27-
2813
type versionSetting struct {
2914
Number string `json:"version" yaml:"version"`
3015
}

0 commit comments

Comments
 (0)