client: remove unused hasEndpointSpecificMacAddress utility

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-10-22 23:16:37 +02:00
parent f2412e7ab4
commit f733b411a1
2 changed files with 2 additions and 28 deletions

View File

@@ -58,7 +58,7 @@ func (cli *Client) ContainerCreate(ctx context.Context, config *container.Config
// formatPlatform returns a formatted string representing platform (e.g., "linux/arm/v7").
//
// It is a fork of [platforms.Format], and does not yet support "os.version",
// as [[platforms.FormatAll] does.
// as [platforms.FormatAll] does.
//
// [platforms.Format]: https://github.com/containerd/platforms/blob/v1.0.0-rc.1/platforms.go#L309-L316
// [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 {
return path.Join(platform.OS, platform.Architecture, platform.Variant)
}
// hasEndpointSpecificMacAddress checks whether one of the endpoint in networkingConfig has a MacAddress defined.
func hasEndpointSpecificMacAddress(networkingConfig *network.NetworkingConfig) bool {
if networkingConfig == nil {
return false
}
for _, endpoint := range networkingConfig.EndpointsConfig {
if endpoint.MacAddress != "" {
return true
}
}
return false
}
// allCapabilities is a magic value for "all capabilities"
const allCapabilities = "ALL"