Standard library / reflect

reflect.Ptr

Kind constant identifying typed pointer, historical alias of Pointer. Expected stdout: 'true\n'.

Formal Syntax & Structure

go syntaxgo
const Ptr Kind = 22

Working Example

Example Snippetgo
package main
import (  "fmt"  "reflect")
func main() { fmt.Println(reflect.TypeOf((*int)(nil)).Kind() == reflect.Ptr) }
Go Reference