Skip to content

Instantly share code, notes, and snippets.

@BruceChen7
Last active April 18, 2022 07:15
Show Gist options
  • Save BruceChen7/685dfa8574a858f871eed679a3e7fbbd to your computer and use it in GitHub Desktop.
Save BruceChen7/685dfa8574a858f871eed679a3e7fbbd to your computer and use it in GitHub Desktop.
#goversion
//go:build go1.12
// +build go1.12
// goversion.go
// Package goversion enforces the go version supported by the tsdb module.
package goversion
const _SoftwareRequiresGOVERSION1_12 = uint8(0)
// init.go
//package goversion
// This will fail to compile if the Go runtime version isn't >= 1.12.
var _ = _SoftwareRequiresGOVERSION1_12
// _ "github.com/prometheus/prometheus/tsdb/goversion" // Load the package into main to make sure minium Go version is met.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment