File tree Expand file tree Collapse file tree 21 files changed +17
-27
lines changed
service_account_credentials Expand file tree Collapse file tree 21 files changed +17
-27
lines changed Original file line number Diff line number Diff line change @@ -6,12 +6,15 @@ FILEPATH="$1"
66
77gofmt -s -w " $FILEPATH "
88
9- # https://github.com/rinchsan/gosimports
9+ # https://github.com/daixiang0/gci
1010if [[ " $FILEPATH " == * " tests/slo/" * ]]
1111then
12- gosimports -local slo -w " $FILEPATH "
12+ gci write --skip-generated -s standard -s default -s " prefix(slo)" " $FILEPATH "
13+ elif [[ " $FILEPATH " == * " examples/" * ]]
14+ then
15+ gci write --skip-generated -s standard -s default -s " prefix(examples)" " $FILEPATH "
1316else
14- gosimports -local github.com/ydb-platform/ydb-go-sdk/v3 -w " $FILEPATH "
17+ gci write --skip-generated -s standard -s default -s " prefix( github.com/ydb-platform/ydb-go-sdk/v3) " " $FILEPATH "
1518fi
1619
1720
Original file line number Diff line number Diff line change 6969 - name : Install utilities
7070 run : |
7171 go install mvdan.cc/gofumpt@v0.3.1
72- go install github.com/rinchsan/gosimports/cmd/gosimports @v0.1.5
72+ go install github.com/daixiang0/gci @v0.12.1
7373 - name : format all files with auto-formatter
7474 run : bash ./.github/scripts/format-all-go-code.sh "$PWD"
7575 - name : Check repository diff
Original file line number Diff line number Diff line change @@ -64,6 +64,12 @@ linters-settings:
6464 # put imports beginning with prefix after 3rd-party packages;
6565 # it's a comma-separated list of prefixes
6666 local-prefixes : github.com/ydb-platform/ydb-go-sdk/v3
67+ gci :
68+ sections :
69+ - standard # Standard section: captures all standard packages.
70+ - default # Default section: contains all imports that could not be matched to another section type.
71+ - prefix(github.com/ydb-platform/ydb-go-sdk/v3) # Custom section: groups all imports with the specified Prefix.
72+ skip-generated : true
6773 goconst :
6874 # minimal length of string constant, 3 by default
6975 min-len : 2
@@ -220,7 +226,6 @@ linters:
220226 - forbidigo
221227 - forcetypeassert
222228 - funlen
223- - gci
224229 - gochecknoglobals
225230 - gocognit
226231 - godot
Original file line number Diff line number Diff line change 66 "os"
77
88 environ "github.com/ydb-platform/ydb-go-sdk-auth-environ"
9-
109 ydb "github.com/ydb-platform/ydb-go-sdk/v3"
1110)
1211
Original file line number Diff line number Diff line change 66 "fmt"
77 "os"
88
9- yc "github.com/ydb-platform/ydb-go-yc"
10-
119 ydb "github.com/ydb-platform/ydb-go-sdk/v3"
10+ yc "github.com/ydb-platform/ydb-go-yc"
1211)
1312
1413var dsn string
Original file line number Diff line number Diff line change 66 "fmt"
77 "os"
88
9- yc "github.com/ydb-platform/ydb-go-yc"
10-
119 ydb "github.com/ydb-platform/ydb-go-sdk/v3"
10+ yc "github.com/ydb-platform/ydb-go-yc"
1211)
1312
1413var (
Original file line number Diff line number Diff line change 88 "time"
99
1010 "github.com/google/uuid"
11-
1211 "github.com/ydb-platform/ydb-go-sdk/v3/table/types"
1312)
1413
Original file line number Diff line number Diff line change 99 "time"
1010
1111 environ "github.com/ydb-platform/ydb-go-sdk-auth-environ"
12-
1312 "github.com/ydb-platform/ydb-go-sdk/v3"
1413 "github.com/ydb-platform/ydb-go-sdk/v3/sugar"
1514)
Original file line number Diff line number Diff line change 88 "time"
99
1010 environ "github.com/ydb-platform/ydb-go-sdk-auth-environ"
11-
1211 "github.com/ydb-platform/ydb-go-sdk/v3"
1312 "github.com/ydb-platform/ydb-go-sdk/v3/sugar"
1413)
Original file line number Diff line number Diff line change @@ -7,12 +7,11 @@ import (
77 "time"
88
99 _ "github.com/lib/pq"
10+ _ "github.com/ydb-platform/ydb-go-sdk/v3"
1011 _ "modernc.org/sqlite"
1112 "xorm.io/builder"
1213 "xorm.io/xorm"
1314 xormLog "xorm.io/xorm/log"
14-
15- _ "github.com/ydb-platform/ydb-go-sdk/v3"
1615)
1716
1817var envNotFoundMessage = `DSN environment variable not defined
You can’t perform that action at this time.
0 commit comments