buildtags

package
v1.6.9 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2023 License: MIT Imports: 0 Imported by: 1

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 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