Skip to content

Commit d600697

Browse files
committed
pkg/compose: un-export consts
These consts were added in b760afa, but are only user internal in the package. Given that the list of consts may change over time, it's probably best to keep them internal and not part of the module's API. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent fefdc95 commit d600697

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

pkg/compose/api_versions.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ package compose
1919
// Docker Engine API version constants.
2020
// These versions correspond to specific Docker Engine releases and their features.
2121
const (
22-
// APIVersion148 represents Docker Engine API version 1.48 (Engine v28.0).
22+
// apiVersion148 represents Docker Engine API version 1.48 (Engine v28.0).
2323
//
2424
// New features in this version:
2525
// - Volume mounts with type=image support
2626
//
2727
// Before this version:
2828
// - Only bind, volume, and tmpfs mount types were supported
29-
APIVersion148 = "1.48"
29+
apiVersion148 = "1.48"
3030

31-
// APIVersion149 represents Docker Engine API version 1.49 (Engine v28.1).
31+
// apiVersion149 represents Docker Engine API version 1.49 (Engine v28.1).
3232
//
3333
// New features in this version:
3434
// - Network interface_name configuration
@@ -37,21 +37,21 @@ const (
3737
// Before this version:
3838
// - interface_name was not configurable
3939
// - ImageList didn't support platform filtering
40-
APIVersion149 = "1.49"
40+
apiVersion149 = "1.49"
4141
)
4242

4343
// Docker Engine version strings for user-facing error messages.
4444
// These should be used in error messages to provide clear version requirements.
4545
const (
46-
// DockerEngineV28 is the major version string for Docker Engine 28.x
47-
DockerEngineV28 = "v28"
46+
// dockerEngineV28 is the major version string for Docker Engine 28.x
47+
dockerEngineV28 = "v28"
4848

4949
// DockerEngineV28_1 is the specific version string for Docker Engine 28.1
5050
DockerEngineV28_1 = "v28.1"
5151
)
5252

5353
// Build tool version constants
5454
const (
55-
// BuildxMinVersion is the minimum required version of buildx for compose build
56-
BuildxMinVersion = "0.17.0"
55+
// buildxMinVersion is the minimum required version of buildx for compose build
56+
buildxMinVersion = "0.17.0"
5757
)

pkg/compose/build_bake.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,8 @@ func (s *composeService) getBuildxPlugin() (*manager.Plugin, error) {
424424
return nil, fmt.Errorf("failed to get version of buildx")
425425
}
426426

427-
if versions.LessThan(buildx.Version[1:], BuildxMinVersion) {
428-
return nil, fmt.Errorf("compose build requires buildx %s or later", BuildxMinVersion)
427+
if versions.LessThan(buildx.Version[1:], buildxMinVersion) {
428+
return nil, fmt.Errorf("compose build requires buildx %s or later", buildxMinVersion)
429429
}
430430

431431
return buildx, nil

pkg/compose/create.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ func defaultNetworkSettings(project *types.Project,
528528
return network.NetworkNone, nil, nil
529529
}
530530

531-
if versions.LessThan(version, APIVersion149) {
531+
if versions.LessThan(version, apiVersion149) {
532532
for _, config := range service.Networks {
533533
if config != nil && config.InterfaceName != "" {
534534
return "", nil, fmt.Errorf("interface_name requires Docker Engine %s or later", DockerEngineV28_1)
@@ -901,8 +901,8 @@ func (s *composeService) buildContainerVolumes(
901901
if err != nil {
902902
return nil, nil, err
903903
}
904-
if versions.LessThan(version, APIVersion148) {
905-
return nil, nil, fmt.Errorf("volume with type=image require Docker Engine %s or later", DockerEngineV28)
904+
if versions.LessThan(version, apiVersion148) {
905+
return nil, nil, fmt.Errorf("volume with type=image require Docker Engine %s or later", dockerEngineV28)
906906
}
907907
}
908908
mounts = append(mounts, m)

pkg/compose/images.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func (s *composeService) Images(ctx context.Context, projectName string, options
6060
if err != nil {
6161
return nil, err
6262
}
63-
withPlatform := versions.GreaterThanOrEqualTo(version, APIVersion149)
63+
withPlatform := versions.GreaterThanOrEqualTo(version, apiVersion149)
6464

6565
summary := map[string]api.ImageSummary{}
6666
var mux sync.Mutex

0 commit comments

Comments
 (0)