Skip to content

Commit 5a2069b

Browse files
committed
chore: reformated
1 parent 9b2dc5c commit 5a2069b

File tree

95 files changed

+254
-136
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+254
-136
lines changed

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
2525
steps:
2626
- uses: actions/checkout@v5
27-
- uses: extractions/setup-just@v4
27+
- uses: extractions/setup-just@v3
2828
- uses: actions/setup-go@v6
2929
with:
3030
go-version: '^1.25'

devpkg/filteropgen/gen.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"github.com/octohelm/gengo/pkg/camelcase"
1010
"github.com/octohelm/gengo/pkg/gengo"
1111
"github.com/octohelm/gengo/pkg/gengo/snippet"
12+
1213
tablegenutil "github.com/octohelm/storage/devpkg/tablegen/util"
1314
"github.com/octohelm/storage/pkg/filter"
1415
"github.com/octohelm/storage/pkg/sqlbuilder"

devpkg/tablegen/gen.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66

77
"github.com/octohelm/gengo/pkg/gengo"
88
"github.com/octohelm/gengo/pkg/gengo/snippet"
9+
910
tablegenutil "github.com/octohelm/storage/devpkg/tablegen/util"
1011
"github.com/octohelm/storage/pkg/sqlbuilder"
1112
"github.com/octohelm/storage/pkg/sqlbuilder/modelscoped"

devpkg/tablegen/util/scan_table.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ import (
77
"strings"
88

99
"github.com/octohelm/gengo/pkg/gengo"
10+
typesx "github.com/octohelm/x/types"
11+
1012
"github.com/octohelm/storage/pkg/sqlbuilder"
1113
"github.com/octohelm/storage/pkg/sqlbuilder/structs"
12-
typesx "github.com/octohelm/x/types"
1314
)
1415

1516
func toDefaultTableName(name string, tableGroup string) string {

go.mod

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
module github.com/octohelm/storage
22

3-
go 1.25.1
3+
go 1.25.3
44

55
tool (
6+
github.com/octohelm/storage/internal/cmd/fmt
67
github.com/octohelm/storage/internal/cmd/gen
7-
mvdan.cc/gofumpt
88
)
99

10+
11+
// +gengo:import:group=0_controlled
1012
require (
1113
github.com/octohelm/enumeration v0.0.0-20250115091102-ddf41951d733
12-
github.com/octohelm/gengo v0.0.0-20250928050614-7aa009184957
13-
github.com/octohelm/x v0.0.0-20251009020353-8be04f917d90
14+
github.com/octohelm/gengo v0.0.0-20251031090256-3806c0e4d0f8
15+
github.com/octohelm/x v0.0.0-20251028032356-02d7b8d1c824
1416
)
1517

1618
require (
1719
github.com/DATA-DOG/go-sqlmock v1.5.2
18-
github.com/davecgh/go-spew v1.1.1
19-
github.com/go-json-experiment/json v0.0.0-20250910080747-cc2cfa0554c3
20+
github.com/go-json-experiment/json v0.0.0-20251027170946-4849db3c2f7e
2021
github.com/google/uuid v1.6.0
2122
github.com/jackc/pgx/v5 v5.7.6
2223
golang.org/x/sync v0.17.0
@@ -41,5 +42,5 @@ require (
4142
modernc.org/libc v1.66.10 // indirect
4243
modernc.org/mathutil v1.7.1 // indirect
4344
modernc.org/memory v1.11.0 // indirect
44-
mvdan.cc/gofumpt v0.9.1 // indirect
45+
mvdan.cc/gofumpt v0.9.2 // indirect
4546
)

go.sum

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
55
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
66
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
77
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
8-
github.com/go-json-experiment/json v0.0.0-20250910080747-cc2cfa0554c3 h1:02WINGfSX5w0Mn+F28UyRoSt9uvMhKguwWMlOAh6U/0=
9-
github.com/go-json-experiment/json v0.0.0-20250910080747-cc2cfa0554c3/go.mod h1:uNVvRXArCGbZ508SxYYTC5v1JWoz2voff5pm25jU1Ok=
8+
github.com/go-json-experiment/json v0.0.0-20251027170946-4849db3c2f7e h1:Lf/gRkoycfOBPa42vU2bbgPurFong6zXeFtPoxholzU=
9+
github.com/go-json-experiment/json v0.0.0-20251027170946-4849db3c2f7e/go.mod h1:uNVvRXArCGbZ508SxYYTC5v1JWoz2voff5pm25jU1Ok=
1010
github.com/go-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI=
1111
github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow=
1212
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
@@ -34,10 +34,10 @@ github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdh
3434
github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
3535
github.com/octohelm/enumeration v0.0.0-20250115091102-ddf41951d733 h1:QFroPAzF1hZYuy90nuxz6XXrX12ZLQUTmsAOLUbBVAk=
3636
github.com/octohelm/enumeration v0.0.0-20250115091102-ddf41951d733/go.mod h1:s4JBUBvmokS4N0uxRnjds0tBRlBn355OFz2EDHLnEZk=
37-
github.com/octohelm/gengo v0.0.0-20250928050614-7aa009184957 h1:4sOv94UPRrmprfMEUNmreWvHtJRYBGartc0BDlWelYc=
38-
github.com/octohelm/gengo v0.0.0-20250928050614-7aa009184957/go.mod h1:LWmTVnPXqioiXcM6w6LE4NFBeFU9bbRkHlBsxXNGiAY=
39-
github.com/octohelm/x v0.0.0-20251009020353-8be04f917d90 h1:anbkT10NtjlBg5Z7syB7wLoG5FyGDD2qYjM/rtI89ho=
40-
github.com/octohelm/x v0.0.0-20251009020353-8be04f917d90/go.mod h1:LTsJ+rfWzwOK93EkNowu59RoM8otlSgI/ROJhXCG/G4=
37+
github.com/octohelm/gengo v0.0.0-20251031090256-3806c0e4d0f8 h1:yuxfCMgT+1JQ/RRSVNisFyt8N+16J8wfJn12xYoO20Q=
38+
github.com/octohelm/gengo v0.0.0-20251031090256-3806c0e4d0f8/go.mod h1:kYALKFuP21j2xmsNjmMPjf2ByOr/YbJ/auTWqhL1iyw=
39+
github.com/octohelm/x v0.0.0-20251028032356-02d7b8d1c824 h1:Yfg5p2WaTqkQX56SoVUSjgxykzKk12XT/YRcIXksRyI=
40+
github.com/octohelm/x v0.0.0-20251028032356-02d7b8d1c824/go.mod h1:LOAvpOP3TzuJDKpowKbqvglxFaOBcranMRTfk82HNU0=
4141
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
4242
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
4343
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
@@ -94,5 +94,5 @@ modernc.org/strutil v1.2.1 h1:UneZBkQA+DX2Rp35KcM69cSsNES9ly8mQWD71HKlOA0=
9494
modernc.org/strutil v1.2.1/go.mod h1:EHkiggD70koQxjVdSBM3JKM7k6L0FbGE5eymy9i3B9A=
9595
modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y=
9696
modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM=
97-
mvdan.cc/gofumpt v0.9.1 h1:p5YT2NfFWsYyTieYgwcQ8aKV3xRvFH4uuN/zB2gBbMQ=
98-
mvdan.cc/gofumpt v0.9.1/go.mod h1:3xYtNemnKiXaTh6R4VtlqDATFwBbdXI8lJvH/4qk7mw=
97+
mvdan.cc/gofumpt v0.9.2 h1:zsEMWL8SVKGHNztrx6uZrXdp7AX8r421Vvp23sz7ik4=
98+
mvdan.cc/gofumpt v0.9.2/go.mod h1:iB7Hn+ai8lPvofHd9ZFGVg2GOr8sBUw1QUWjNbmIL/s=

internal/cmd/fmt/main.go

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
package main
2+
3+
import (
4+
"context"
5+
"flag"
6+
"fmt"
7+
"os"
8+
9+
"github.com/octohelm/gengo/pkg/format"
10+
)
11+
12+
func main() {
13+
flag.Parse()
14+
15+
ctx := context.Background()
16+
17+
p := &format.Project{
18+
Entrypoint: flag.Args(),
19+
List: true,
20+
Write: true,
21+
}
22+
if err := p.Init(ctx); err != nil {
23+
_, _ = fmt.Fprintln(os.Stderr, err)
24+
os.Exit(1)
25+
return
26+
}
27+
28+
if err := p.Run(ctx); err != nil {
29+
_, _ = fmt.Fprintln(os.Stderr, err)
30+
os.Exit(1)
31+
return
32+
}
33+
}

internal/cmd/gen/main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@ import (
77
"github.com/octohelm/gengo/pkg/gengo"
88
"github.com/octohelm/x/logr"
99
"github.com/octohelm/x/logr/slog"
10+
)
1011

12+
import (
1113
_ "github.com/octohelm/enumeration/devpkg/enumgen"
1214
_ "github.com/octohelm/gengo/devpkg/runtimedocgen"
15+
1316
_ "github.com/octohelm/storage/devpkg/filteropgen"
1417
_ "github.com/octohelm/storage/devpkg/tablegen"
1518
)

internal/sql/adapter/adapter.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ import (
66
"fmt"
77
"net/url"
88

9+
syncx "github.com/octohelm/x/sync"
10+
911
"github.com/octohelm/storage/pkg/sqlbuilder"
1012
"github.com/octohelm/storage/pkg/sqlfrag"
11-
syncx "github.com/octohelm/x/sync"
1213
)
1314

1415
type DB interface {

internal/sql/adapter/postgres/adapter.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ import (
1010
"strings"
1111
"sync"
1212

13-
"github.com/octohelm/storage/pkg/sqlfrag"
14-
1513
"github.com/jackc/pgx/v5/pgconn"
1614
"github.com/jackc/pgx/v5/pgxpool"
1715
"github.com/jackc/pgx/v5/stdlib"
16+
1817
"github.com/octohelm/storage/internal/sql/adapter"
1918
"github.com/octohelm/storage/internal/sql/loggingdriver"
2019
"github.com/octohelm/storage/pkg/dberr"
20+
"github.com/octohelm/storage/pkg/sqlfrag"
2121
)
2222

2323
func init() {

0 commit comments

Comments
 (0)