diff --git a/cli/command/service/update.go b/cli/command/service/update.go index 5ed39d909bbb..ac3eb88ca89d 100644 --- a/cli/command/service/update.go +++ b/cli/command/service/update.go @@ -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{}) diff --git a/cli/compose/convert/service.go b/cli/compose/convert/service.go index 0f8af6897c19..ab18204cd44c 100644 --- a/cli/compose/convert/service.go +++ b/cli/compose/convert/service.go @@ -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 }