Standard library / go/types

go/types.Term.String()

Formats the term including a tilde if present. Expected stdout: '~int\n'.

Formal Syntax & Structure

go syntaxgo
func (t *Term) String() string

Return Value

string

Formats the term including a tilde if present.

Working Example

Example Snippetgo
package main
import (  "fmt"  "go/types")
func term() *types.Term { return types.NewTerm(true, types.Typ[types.Int]) }
func main() { v := term(); fmt.Println(v.String()) }
Go Reference