Standard library / go/build/constraint

go/build/constraint.NotExpr.String()

Formats this logical negation in modern build-expression syntax. Expected stdout: '!windows\n'.

Formal Syntax & Structure

go syntaxgo
func (x *NotExpr) String() string

Return Value

string

Formats this logical negation in modern build-expression syntax.

Working Example

Example Snippetgo
package main
import (  "fmt"  "go/build/constraint")
func main() {  x := &constraint.NotExpr{X: &constraint.TagExpr{Tag: "windows"}}  fmt.Println(x.String())}
Go Reference