Standard library / go/build/constraint
go/build/constraint.TagExpr.String()
Formats this single build tag in modern build-expression syntax. Expected stdout: 'linux\n'.
Formal Syntax & Structure
go syntaxgo
func (x *TagExpr) String() stringReturn Value
string
Formats this single build tag in modern build-expression syntax.
Working Example
Example Snippetgo
package main
import ( "fmt" "go/build/constraint")
func main() { x := &constraint.TagExpr{Tag: "linux"}; fmt.Println(x.String()) }