diff --git a/ci/Dockerfile b/ci/Dockerfile index af11f69e..dedd69b6 100644 --- a/ci/Dockerfile +++ b/ci/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM golang:1.21 +FROM golang:1.23 WORKDIR /go/src diff --git a/go.mod b/go.mod index c5d21185..082bb2f1 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/compose-spec/compose-go/v2 -go 1.21 +go 1.23 require ( github.com/distribution/reference v0.5.0 diff --git a/loader/loader_test.go b/loader/loader_test.go index b6167566..8c06c5dd 100644 --- a/loader/loader_test.go +++ b/loader/loader_test.go @@ -1921,7 +1921,6 @@ services: }, } for _, testcase := range testcases { - testcase := testcase t.Run(testcase.doc, func(t *testing.T) { config, err := loadYAML(testcase.yaml) assert.NilError(t, err) diff --git a/template/template_test.go b/template/template_test.go index c52fdcd9..2309ed23 100644 --- a/template/template_test.go +++ b/template/template_test.go @@ -218,7 +218,6 @@ func TestInterpolationExternalInterference(t *testing.T) { }, } for i, tc := range testCases { - tc := tc t.Run(fmt.Sprintf("Interpolation Should not be impacted by outer text: %d", i), func(t *testing.T) { result, err := Substitute(tc.template, defaultMapping) assert.NilError(t, err) diff --git a/template/variables_test.go b/template/variables_test.go index 7239b016..b2b18f64 100644 --- a/template/variables_test.go +++ b/template/variables_test.go @@ -193,7 +193,6 @@ func TestExtractVariables(t *testing.T) { }, } for _, tc := range testCases { - tc := tc t.Run(tc.name, func(t *testing.T) { actual := ExtractVariables(tc.dict, DefaultPattern) assert.Check(t, is.DeepEqual(actual, tc.expected)) diff --git a/types/labels.go b/types/labels.go index 713c28f9..7ea5edc4 100644 --- a/types/labels.go +++ b/types/labels.go @@ -55,7 +55,6 @@ func (l Labels) AsList() []string { func (l Labels) ToMappingWithEquals() MappingWithEquals { mapping := MappingWithEquals{} for k, v := range l { - v := v mapping[k] = &v } return mapping diff --git a/types/mapping.go b/types/mapping.go index 63f6e58b..87f16314 100644 --- a/types/mapping.go +++ b/types/mapping.go @@ -157,7 +157,6 @@ func (m Mapping) Values() []string { func (m Mapping) ToMappingWithEquals() MappingWithEquals { mapping := MappingWithEquals{} for k, v := range m { - v := v mapping[k] = &v } return mapping diff --git a/types/types_test.go b/types/types_test.go index 500f8b6f..ecca54c7 100644 --- a/types/types_test.go +++ b/types/types_test.go @@ -318,7 +318,6 @@ func TestMarshalServiceEntrypoint(t *testing.T) { } for _, tc := range tcs { - tc := tc t.Run(tc.name, func(t *testing.T) { t.Parallel()