Standard library / go/types

go/types.NewSignature()

Legacy signature constructor without type parameter lists. Prefer NewSignatureType. Expected stdout: 'func()\n'.

Formal Syntax & Structure

go syntaxgo
func NewSignature(recv *Var, params, results *Tuple, variadic bool) *Signature

Parameters & Attributes

NameTypeDescription
recv*VarInput to the operation as described above.
params*TupleInput to the operation as described above.
results*TupleInput to the operation as described above.
variadicboolInput to the operation as described above.

Return Value

*Signature

Legacy signature constructor without type parameter lists.

Working Example

Example Snippetgo
package main
import (  "fmt"  "go/types")
func main() { s := types.NewSignature(nil, nil, nil, false); fmt.Println(s) }
Go Reference