buildtags

package
v0.5.19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

README

buildtags

As building with hedzr/log/, the tags are:

go build -tags=docker,k8s,istio ./...

The usages will be:

if buildtags.IsDockerBuild() {
	//
}
if buildtags.IsK8sBuild() {
//
}
if buildtags.IsIstioBuild() {
//
}

Documentation

Index

Constants

View Source
const VerboseEnabled = false

VerboseEnabled identify whether `--tags=verbose` has been defined in go building

Variables

This section is empty.

Functions

func IsBuildTagExists added in v0.5.9

func IsBuildTagExists(tag string) (yes bool)

IsBuildTagExists detects if a tag specified at building time.

func IsDockerBuild

func IsDockerBuild() bool

IsDockerBuild tests if go build with -tags=docker-build

func IsIstioBuild

func IsIstioBuild() bool

IsIstioBuild tests if go build with -tags=istio

func IsK8sBuild

func IsK8sBuild() bool

IsK8sBuild tests if go build with -tags=k8s

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL