Skip to content

Commit e71e4fa

Browse files
author
Jose Luis Vazquez Gonzalez
committed
Move to a minimum version check with build tags
1 parent 4de8b2c commit e71e4fa

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

Makefile

-5
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,10 @@ default: build
1010
.PHONY: deps-go-binary deps-counterfeiter deps-ginkgo deps-golangci-lint
1111

1212
GO_VERSION := $(shell go version)
13-
GO_VERSION_REQUIRED = go1.18
14-
GO_VERSION_MATCHED := $(shell go version | grep $(GO_VERSION_REQUIRED))
1513

1614
deps-go-binary:
1715
ifndef GO_VERSION
1816
$(error Go not installed)
19-
endif
20-
ifndef GO_VERSION_MATCHED
21-
$(error Required Go version is $(GO_VERSION_REQUIRED), but was $(GO_VERSION))
2217
endif
2318
@:
2419

main.go

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// Copyright 2021 VMware, Inc.
22
// SPDX-License-Identifier: BSD-2-Clause
33

4+
//go:build go1.17
5+
46
package main
57

68
import (

pkg/mover/chart.go

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// Copyright 2021 VMware, Inc.
22
// SPDX-License-Identifier: BSD-2-Clause
33

4+
//go:build go1.17
5+
46
package mover
57

68
import (

0 commit comments

Comments
 (0)