Skip to content

Commit

Permalink
add nolint:staticcheck to spec.Networks refs
Browse files Browse the repository at this point in the history
Signed-off-by: Albin Kerouanton <[email protected]>
  • Loading branch information
akerouanton committed Nov 24, 2023
1 parent 9c241e2 commit 72a0f94
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cli/command/service/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -1295,9 +1295,9 @@ func updateNetworks(ctx context.Context, apiClient client.NetworkAPIClient, flag
// values to spec.TaskTemplate.Networks.
specNetworks := spec.TaskTemplate.Networks
if len(specNetworks) == 0 {
specNetworks = spec.Networks
specNetworks = spec.Networks //nolint:staticcheck // ignore SA1019: field is deprecated.
}
spec.Networks = nil
spec.Networks = nil //nolint:staticcheck // ignore SA1019: field is deprecated.

toRemove := buildToRemoveSet(flags, flagNetworkRemove)
idsToRemove := make(map[string]struct{})
Expand Down
2 changes: 1 addition & 1 deletion cli/compose/convert/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ func Service(
// ServiceSpec.Networks to TaskTemplate.Networks. So which field to use
// is conditional on daemon version.
if versions.LessThan(apiVersion, "1.29") {
serviceSpec.Networks = networks
serviceSpec.Networks = networks //nolint:staticcheck // ignore SA1019: field is deprecated.
} else {
serviceSpec.TaskTemplate.Networks = networks
}
Expand Down

0 comments on commit 72a0f94

Please sign in to comment.