Skip to content

Commit

Permalink
Use Go 1.23 (#591)
Browse files Browse the repository at this point in the history
Signed-off-by: 1gtm <[email protected]>
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
1gtm authored Aug 17, 2024
1 parent e73f187 commit 77b4b77
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ concurrency:
jobs:
build:
name: Build
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- name: Set up Go 1.22
- name: Set up Go 1.23
uses: actions/setup-go@v1
with:
go-version: '1.22'
go-version: '1.23'
id: go

- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ ARCH := $(if $(GOARCH),$(GOARCH),$(shell go env GOARCH))
BASEIMAGE_PROD ?= gcr.io/distroless/static-debian12
BASEIMAGE_DBG ?= debian:bookworm

GO_VERSION ?= 1.22
GO_VERSION ?= 1.23
BUILD_IMAGE ?= ghcr.io/appscode/golang-dev:$(GO_VERSION)

OUTBIN = bin/$(OS)_$(ARCH)/$(BIN)
Expand Down
4 changes: 3 additions & 1 deletion apiextensions/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@ type setupGroup struct {
fn SetupFn
}

type crdParamKey struct{}

var (
setupFns = make(map[schema.GroupKind]setupGroup)
testFns = make(map[schema.GroupKind]TestFn)
setupDone = map[schema.GroupKind]bool{}
CRDParam = struct{}{}
CRDParam = crdParamKey{}
mu sync.Mutex
)

Expand Down
2 changes: 1 addition & 1 deletion conditions/getter.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ func mirror(from Getter, targetCondition kmapi.ConditionType, options ...MirrorO
case true:
condition = TrueCondition(targetCondition)
case false:
condition = FalseCondition(targetCondition, mirrorOpt.fallbackReason, mirrorOpt.fallbackSeverity, mirrorOpt.fallbackMessage)
condition = FalseCondition(targetCondition, mirrorOpt.fallbackReason, mirrorOpt.fallbackSeverity, mirrorOpt.fallbackMessage) //nolint:govet
}
}

Expand Down
4 changes: 2 additions & 2 deletions conditions/merge.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ func merge(conditions []localizedCondition, targetCondition kmapi.ConditionType,
targetMessage := getMessage(g, options)

if g.TopGroup().status == metav1.ConditionFalse {
return FalseCondition(targetCondition, targetReason, g.TopGroup().severity, targetMessage)
return FalseCondition(targetCondition, targetReason, g.TopGroup().severity, targetMessage) //nolint:govet
}
return UnknownCondition(targetCondition, targetReason, targetMessage)
return UnknownCondition(targetCondition, targetReason, targetMessage) //nolint:govet
}

// getConditionGroups groups a list of conditions according to status, severity values.
Expand Down
4 changes: 2 additions & 2 deletions meta/preconditions.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package meta

import (
"fmt"
"errors"
"strings"

"k8s.io/apimachinery/pkg/util/mergepatch"
Expand Down Expand Up @@ -46,7 +46,7 @@ func (s PreConditionSet) PreconditionFunc() []mergepatch.PreconditionFunc {

func (s PreConditionSet) Error() error {
strList := strings.Join(sets.List[string](s.Set), "\n\t")
return fmt.Errorf(strings.Join([]string{`At least one of the following was changed:
return errors.New(strings.Join([]string{`At least one of the following was changed:
apiVersion
kind
name
Expand Down
2 changes: 1 addition & 1 deletion tools/portforward/tunnel.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ func (t *Tunnel) getFirstSelectedPod(k8sClient kubernetes.Interface) (*core.Pod,
if err != nil {
return nil, err
}
if obj.Spec.Selector == nil || len(obj.Spec.Selector) == 0 {
if len(obj.Spec.Selector) == 0 {
return nil, fmt.Errorf("invalid label selector. Error: %v", err)
}
podSelector = labels.SelectorFromSet(obj.Spec.Selector)
Expand Down

0 comments on commit 77b4b77

Please sign in to comment.