Standard library / go/types
go/types.NewContext()
Creates a context for sharing equivalent generic instantiations. Expected stdout: 'true\n'.
Formal Syntax & Structure
go syntaxgo
func NewContext() *ContextReturn Value
*Context
Creates a context for sharing equivalent generic instantiations.
Working Example
Example Snippetgo
package main
import ( "fmt" "go/types")
func main() { fmt.Println(types.NewContext() != nil) }