func LookupSignature(pkg *types.Package, name string) (*Signature, error) {
	scope := pkg.Scope()
	obj := scope.Lookup(name)
	if obj == nil {
		return nil, fmt.Errorf("could not find function \"%s\"", name)
	}
	s, ok := obj.Type().(*types.Signature)
	if !ok {
		return nil, fmt.Errorf("object \"%s\" does not have signature type", name)
	}
	return NewSignature(pkg, s), nil
}
LookupSignature returns the signature of the named function in the provided package.
package gotypes
import (
	"bytes"
	"errors"
	"fmt"
	"go/token"
	"go/types"
	"strconv"
	"github.com/mmcloughlin/avo/operand"
)
type Signature struct {
	pkg     *types.Package
	sig     *types.Signature
	params  *Tuple
	results *Tuple
}
func NewSignature(pkg *types.Package, sig *types.Signature) *Signature {
	s := &Signature{
		pkg: pkg,
		sig: sig,
	}
	s.init()
	return s
}
func NewSignatureVoid() *Signature {
	return NewSignature(nil, types.NewSignature(nil, nil, nil, false))
}