Browse code

client: remove unused hasEndpointSpecificMacAddress utility

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2025/10/23 06:16:37
Showing 2 changed files
... ...
@@ -58,7 +58,7 @@ func (cli *Client) ContainerCreate(ctx context.Context, config *container.Config
58 58
 // formatPlatform returns a formatted string representing platform (e.g., "linux/arm/v7").
59 59
 //
60 60
 // It is a fork of [platforms.Format], and does not yet support "os.version",
61
-// as [[platforms.FormatAll] does.
61
+// as [platforms.FormatAll] does.
62 62
 //
63 63
 // [platforms.Format]: https://github.com/containerd/platforms/blob/v1.0.0-rc.1/platforms.go#L309-L316
64 64
 // [platforms.FormatAll]: https://github.com/containerd/platforms/blob/v1.0.0-rc.1/platforms.go#L318-L330
... ...
@@ -69,19 +69,6 @@ func formatPlatform(platform ocispec.Platform) string {
69 69
 	return path.Join(platform.OS, platform.Architecture, platform.Variant)
70 70
 }
71 71
 
72
-// hasEndpointSpecificMacAddress checks whether one of the endpoint in networkingConfig has a MacAddress defined.
73
-func hasEndpointSpecificMacAddress(networkingConfig *network.NetworkingConfig) bool {
74
-	if networkingConfig == nil {
75
-		return false
76
-	}
77
-	for _, endpoint := range networkingConfig.EndpointsConfig {
78
-		if endpoint.MacAddress != "" {
79
-			return true
80
-		}
81
-	}
82
-	return false
83
-}
84
-
85 72
 // allCapabilities is a magic value for "all capabilities"
86 73
 const allCapabilities = "ALL"
87 74
 
... ...
@@ -58,7 +58,7 @@ func (cli *Client) ContainerCreate(ctx context.Context, config *container.Config
58 58
 // formatPlatform returns a formatted string representing platform (e.g., "linux/arm/v7").
59 59
 //
60 60
 // It is a fork of [platforms.Format], and does not yet support "os.version",
61
-// as [[platforms.FormatAll] does.
61
+// as [platforms.FormatAll] does.
62 62
 //
63 63
 // [platforms.Format]: https://github.com/containerd/platforms/blob/v1.0.0-rc.1/platforms.go#L309-L316
64 64
 // [platforms.FormatAll]: https://github.com/containerd/platforms/blob/v1.0.0-rc.1/platforms.go#L318-L330
... ...
@@ -69,19 +69,6 @@ func formatPlatform(platform ocispec.Platform) string {
69 69
 	return path.Join(platform.OS, platform.Architecture, platform.Variant)
70 70
 }
71 71
 
72
-// hasEndpointSpecificMacAddress checks whether one of the endpoint in networkingConfig has a MacAddress defined.
73
-func hasEndpointSpecificMacAddress(networkingConfig *network.NetworkingConfig) bool {
74
-	if networkingConfig == nil {
75
-		return false
76
-	}
77
-	for _, endpoint := range networkingConfig.EndpointsConfig {
78
-		if endpoint.MacAddress != "" {
79
-			return true
80
-		}
81
-	}
82
-	return false
83
-}
84
-
85 72
 // allCapabilities is a magic value for "all capabilities"
86 73
 const allCapabilities = "ALL"
87 74