func print(w io.Writer, pkg *types.Package, filter func(types.Object) bool) { … } type printer … func (p *printer) print(s string) { … } func (p *printer) printf(format string, args ...interface{ … } // methodsFor returns the named type and corresponding methods if the type // denoted by obj is not an interface and has methods. Otherwise it returns // the zero value. func methodsFor(obj *types.TypeName) (*types.Named, []*types.Selection) { … } func (p *printer) printPackage(pkg *types.Package, filter func(types.Object) bool) { … } func (p *printer) printDecl(keyword string, n int, printGroup func()) { … } // absInt returns the absolute value of v as a *big.Int. // v must be a numeric value. func absInt(v constant.Value) *big.Int { … } var one … var ten … // floatString returns the string representation for a // numeric value v in normalized floating-point format. func floatString(v constant.Value) string { … } // valString returns the string representation for the value v. // Setting floatFmt forces an integer value to be formatted in // normalized floating-point format. // TODO(gri) Move this code into package constant. func valString(v constant.Value, floatFmt bool) string { … } func (p *printer) printObj(obj types.Object) { … } func (p *printer) printFunc(recvType types.Type, obj *types.Func) { … } // combinedMethodSet returns the method set for a named type T // merged with all the methods of *T that have different names than // the methods of T. // // combinedMethodSet is analogous to types/typeutil.IntuitiveMethodSet // but doesn't require a MethodSetCache. // TODO(gri) If this functionality doesn't change over time, consider // just calling IntuitiveMethodSet eventually. func combinedMethodSet(T *types.Named) []*types.Selection { … }