Standard library / go/types

go/types.Pointer

Represents a Go pointer type in the semantic model, not a runtime value. Expected stdout: '*int\n'.

Formal Syntax & Structure

go syntaxgo
type Pointer struct {}

Working Example

Example Snippetgo
package main
import (  "fmt"  "go/types")
func main() { t := types.NewPointer(types.Typ[types.Int]); fmt.Println(t) }
Go Reference