Skip to content

Commit 9409266

Browse files
lint fixes
1 parent 20bc1e8 commit 9409266

File tree

5 files changed

+13
-8
lines changed

5 files changed

+13
-8
lines changed

example/app/schema.pqt.go

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/generator/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ func main() {
4444
if err != nil {
4545
log.Fatal(err)
4646
}
47+
fmt.Fprint(file, "/// SQL ...\n")
4748
fmt.Fprint(file, "const SQL = `\n")
4849
if err := pqtsql.NewGenerator().GenerateTo(sch, file); err != nil {
4950
log.Fatal(err)

pqtgo/generator.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,13 @@ const (
2626
`
2727
)
2828

29+
// Visibility ...
2930
type Visibility string
3031

3132
const (
32-
Public Visibility = "public"
33+
// Public ...
34+
Public Visibility = "public"
35+
// Private ...
3336
Private Visibility = "private"
3437
)
3538

@@ -328,7 +331,7 @@ func (i *%sIterator) Columns() ([]string, error) {
328331
return i.cols, nil
329332
}
330333
331-
// Ent is wrapper arround %s method that makes iterator more generic.
334+
// Ent is wrapper around %s method that makes iterator more generic.
332335
func (i *%sIterator) Ent() (interface{}, error) {
333336
return i.%s()
334337
}

pqtgo/generator_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ func (i *firstIterator) Columns() ([]string, error) {
128128
return i.cols, nil
129129
}
130130
131-
// Ent is wrapper arround first method that makes iterator more generic.
131+
// Ent is wrapper around first method that makes iterator more generic.
132132
func (i *firstIterator) Ent() (interface{}, error) {
133133
return i.First()
134134
}

relationship_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func TestWithColumnName(t *testing.T) {
3030
}
3131

3232
if !exists {
33-
t.Errorf("comment table should have collumn with name %s", icn)
33+
t.Errorf("comment table should have column with name %s", icn)
3434
}
3535
}
3636

0 commit comments

Comments
 (0)