Skip to content

Commit 5f47cef

Browse files
committed
fix nolint comments for SA1019: filters.ToParamWithVersion is deprecated
The old nolint comment didn't seem to work anymore; ``` client/container_list.go:39:22: SA1019: filters.ToParamWithVersion is deprecated: do not use in any new code; use ToJSON instead (staticcheck) client/events.go:94:22: SA1019: filters.ToParamWithVersion is deprecated: do not use in any new code; use ToJSON instead (staticcheck) client/image_list.go:28:22: SA1019: filters.ToParamWithVersion is deprecated: do not use in any new code; use ToJSON instead (staticcheck) ``` Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent ec1fd4b commit 5f47cef

7 files changed

Lines changed: 7 additions & 7 deletions

File tree

client/container_list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ func (cli *Client) ContainerList(ctx context.Context, options types.ContainerLis
3535
}
3636

3737
if options.Filters.Len() > 0 {
38-
//lint:ignore SA1019 for old code
38+
//nolint:staticcheck // ignore SA1019 for old code
3939
filterJSON, err := filters.ToParamWithVersion(cli.version, options.Filters)
4040

4141
if err != nil {

client/events.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ func buildEventsQueryParams(cliVersion string, options types.EventsOptions) (url
9090
}
9191

9292
if options.Filters.Len() > 0 {
93-
//lint:ignore SA1019 for old code
93+
//nolint:staticcheck // ignore SA1019 for old code
9494
filterJSON, err := filters.ToParamWithVersion(cliVersion, options.Filters)
9595
if err != nil {
9696
return nil, err

client/hijack.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ func (cli *Client) setupHijackConn(ctx context.Context, req *http.Request, proto
8888
// Server hijacks the connection, error 'connection closed' expected
8989
resp, err := clientconn.Do(req)
9090

91-
//lint:ignore SA1019 for connecting to old (pre go1.8) daemons
91+
//nolint:staticcheck // ignore SA1019 for connecting to old (pre go1.8) daemons
9292
if err != httputil.ErrPersistEOF {
9393
if err != nil {
9494
return nil, err

client/image_list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func (cli *Client) ImageList(ctx context.Context, options types.ImageListOptions
2424
}
2525
}
2626
if optionFilters.Len() > 0 {
27-
//lint:ignore SA1019 for old code
27+
//nolint:staticcheck // ignore SA1019 for old code
2828
filterJSON, err := filters.ToParamWithVersion(cli.version, optionFilters)
2929
if err != nil {
3030
return images, err

client/network_list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
func (cli *Client) NetworkList(ctx context.Context, options types.NetworkListOptions) ([]types.NetworkResource, error) {
1414
query := url.Values{}
1515
if options.Filters.Len() > 0 {
16-
//lint:ignore SA1019 for old code
16+
//nolint:staticcheck // ignore SA1019 for old code
1717
filterJSON, err := filters.ToParamWithVersion(cli.version, options.Filters)
1818
if err != nil {
1919
return nil, err

client/plugin_list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ func (cli *Client) PluginList(ctx context.Context, filter filters.Args) (types.P
1515
query := url.Values{}
1616

1717
if filter.Len() > 0 {
18-
//lint:ignore SA1019 for old code
18+
//nolint:staticcheck // ignore SA1019 for old code
1919
filterJSON, err := filters.ToParamWithVersion(cli.version, filter)
2020
if err != nil {
2121
return plugins, err

client/volume_list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ func (cli *Client) VolumeList(ctx context.Context, filter filters.Args) (volumet
1515
query := url.Values{}
1616

1717
if filter.Len() > 0 {
18-
//lint:ignore SA1019 for old code
18+
//nolint:staticcheck // ignore SA1019 for old code
1919
filterJSON, err := filters.ToParamWithVersion(cli.version, filter)
2020
if err != nil {
2121
return volumes, err

0 commit comments

Comments
 (0)