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) *SignatureParameters & Attributes
| Name | Type | Description |
|---|---|---|
| recv | *Var | Input to the operation as described above. |
| params | *Tuple | Input to the operation as described above. |
| results | *Tuple | Input to the operation as described above. |
| variadic | bool | Input 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) }