Skip to content

Commit 13de485

Browse files
committed
review: use fork
1 parent a00af47 commit 13de485

File tree

5 files changed

+18
-57
lines changed

5 files changed

+18
-57
lines changed

go.mod

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ require (
5151
github.com/golangci/misspell v0.6.0
5252
github.com/golangci/plugin-module-register v0.1.1
5353
github.com/golangci/revgrep v0.8.0
54+
github.com/golangci/swaggoswag v0.0.0-20250504205917-77f2aca3143e
5455
github.com/golangci/unconvert v0.0.0-20250410112200-a129a6e6413e
5556
github.com/gordonklaus/ineffassign v0.1.0
5657
github.com/gostaticanalysis/forcetypeassert v0.2.0
@@ -108,7 +109,6 @@ require (
108109
github.com/ssgreg/nlreturn/v2 v2.2.1
109110
github.com/stbenjam/no-sprintf-host-port v0.2.0
110111
github.com/stretchr/testify v1.10.0
111-
github.com/swaggo/swag v1.16.4
112112
github.com/tdakkota/asciicheck v0.4.1
113113
github.com/tetafro/godot v1.5.1
114114
github.com/timakin/bodyclose v0.0.0-20241222091800-1db5c5ca4d67
@@ -139,10 +139,7 @@ require (
139139
)
140140

141141
require (
142-
github.com/KyleBanks/depth v1.2.1 // indirect
143142
github.com/Masterminds/semver/v3 v3.3.1 // indirect
144-
github.com/PuerkitoBio/purell v1.1.1 // indirect
145-
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
146143
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
147144
github.com/beorn7/perks v1.0.1 // indirect
148145
github.com/ccojocar/zxcvbn-go v1.0.2 // indirect
@@ -160,10 +157,6 @@ require (
160157
github.com/fatih/structtag v1.2.0 // indirect
161158
github.com/fsnotify/fsnotify v1.5.4 // indirect
162159
github.com/go-ole/go-ole v1.2.6 // indirect
163-
github.com/go-openapi/jsonpointer v0.19.5 // indirect
164-
github.com/go-openapi/jsonreference v0.19.6 // indirect
165-
github.com/go-openapi/spec v0.20.4 // indirect
166-
github.com/go-openapi/swag v0.19.15 // indirect
167160
github.com/go-toolsmith/astcast v1.1.0 // indirect
168161
github.com/go-toolsmith/astcopy v1.1.0 // indirect
169162
github.com/go-toolsmith/astequal v1.2.0 // indirect
@@ -181,11 +174,9 @@ require (
181174
github.com/hashicorp/hcl v1.0.0 // indirect
182175
github.com/hexops/gotextdiff v1.0.3 // indirect
183176
github.com/inconshreveable/mousetrap v1.1.0 // indirect
184-
github.com/josharian/intern v1.0.0 // indirect
185177
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
186178
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
187179
github.com/magiconair/properties v1.8.6 // indirect
188-
github.com/mailru/easyjson v0.7.6 // indirect
189180
github.com/mattn/go-isatty v0.0.20 // indirect
190181
github.com/mattn/go-runewidth v0.0.16 // indirect
191182
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
@@ -219,7 +210,6 @@ require (
219210
go.uber.org/zap v1.24.0 // indirect
220211
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect
221212
golang.org/x/exp/typeparams v0.0.0-20250210185358-939b2ce775ac // indirect
222-
golang.org/x/net v0.39.0 // indirect
223213
golang.org/x/sync v0.13.0 // indirect
224214
golang.org/x/text v0.24.0 // indirect
225215
google.golang.org/protobuf v1.36.6 // indirect

go.sum

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

pkg/goformatters/swaggo/swaggo.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
package swaggo
22

3-
import "github.com/swaggo/swag"
3+
import "github.com/golangci/swaggoswag"
44

55
const Name = "swaggo"
66

77
type Formatter struct {
8-
formatter *swag.Formatter
8+
formatter *swaggoswag.Formatter
99
}
1010

1111
func New() *Formatter {
1212
return &Formatter{
13-
formatter: swag.NewFormatter(),
13+
formatter: swaggoswag.NewFormatter(),
1414
}
1515
}
1616

pkg/golinters/swaggo/swaggo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const linterName = "swaggo"
1313
func New() *goanalysis.Linter {
1414
a := goformatters.NewAnalyzer(
1515
internal.LinterLogger.Child(linterName),
16-
"Checks if swaggo comments are formatted",
16+
"Check if swaggo comments are formatted",
1717
swaggo.New(),
1818
)
1919

pkg/golinters/swaggo/testdata/fix/out/swaggo.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ package api
44

55
import "net/http"
66

7-
// @Summary Add a new pet to the store
8-
// @Description get string by ID
9-
// @ID get-string-by-int
10-
// @Accept json
11-
// @Produce json
12-
// @Param some_id path int true "Some ID" Format(int64)
13-
// @Param some_id body web.Pet true "Some ID"
14-
// @Success 200 {string} string "ok"
15-
// @Failure 400 {object} web.APIError "We need ID!!"
16-
// @Failure 404 {object} web.APIError "Can not find ID"
17-
// @Router /testapi/get-string-by-int/{some_id} [get]
7+
// @Summary Add a new pet to the store
8+
// @Description get string by ID
9+
// @ID get-string-by-int
10+
// @Accept json
11+
// @Produce json
12+
// @Param some_id path int true "Some ID" Format(int64)
13+
// @Param some_id body web.Pet true "Some ID"
14+
// @Success 200 {string} string "ok"
15+
// @Failure 400 {object} web.APIError "We need ID!!"
16+
// @Failure 404 {object} web.APIError "Can not find ID"
17+
// @Router /testapi/get-string-by-int/{some_id} [get]
1818
func GetStringByInt(w http.ResponseWriter, r *http.Request) {}

0 commit comments

Comments
 (0)