Standard library / go/types
go/types.Tuple
Represents a Go tuple type in the semantic model, not a runtime value. Expected stdout: '(x int)\n'.
Formal Syntax & Structure
go syntaxgo
type Tuple struct {}Working Example
Example Snippetgo
package main
import ( "fmt" "go/types")
func main() { t := types.NewTuple(types.NewVar(0, nil, "x", types.Typ[types.Int])); fmt.Println(t) }