Imports #
"fmt"
logpkg "log"
"math"
"os"
"testing"
"unsafe"
"fmt"
logpkg "log"
"math"
"os"
"testing"
"unsafe"
var embeddedStringerv embeddedStringervar nonemptyinterface = *ast.CallExprvar notPercentDV notPercentDStructvar notstringerarrayv notstringerarrayvar notstringerv notstringervar percentDV percentDStructvar percentSV percentSStructvar recursiveMapV = *ast.CallExprvar recursiveSliceV = *ast.UnaryExprvar recursiveStruct1V = *ast.UnaryExprvar recursiveStructV = *ast.UnaryExprvar stringerarrayv stringerarrayvar stringerv ptrStringertype BoolFormatter boolFormatter with value receiver
type FormatterVal booltype RecursiveMap map[int]RecursiveMaptype RecursiveSlice []RecursiveSliceError methods that do not satisfy the Error interface and should be checked.
type errorTest1 inttype errorTest2 inttype errorTest3 inttype errorTest4 inttype errorTest5 inttype notstringerarray [4]float64type ptrStringer float64type recursivePtrStringer inttype recursiveStringer inttype stringer inttype stringerarray [4]float64type errorInterface interface {
error
ExtraMethod()
}type RecursiveStruct struct {
next *RecursiveStruct
}type RecursiveStruct1 struct {
next *RecursiveStruct2
}type RecursiveStruct2 struct {
next *RecursiveStruct1
}type embeddedStringer struct {
foo string
ptrStringer
bar int
}type errorer struct {
}A data type we cannot print correctly with "%d".
type notPercentDStruct struct {
a int
b []byte
c bool
}type notstringer struct {
f float64
}A data type we can print with "%d".
type percentDStruct struct {
a int
b []byte
c *float64
}A data type we can print with "%s".
type percentSStruct struct {
a string
b []byte
C stringerarray
}type someStruct struct {
}type unexportedCustomError struct {
e errorer
}Issue 17798: unexported error cannot be formatted.
type unexportedError struct {
e error
}type unexportedErrorInterface struct {
e errorInterface
}type unexportedErrorOtherFields struct {
s string
e error
S string
}type unexportedInterface struct {
f interface{}
}Issue 17798: unexported ptrStringer cannot be formatted.
type unexportedStringer struct {
t ptrStringer
}type unexportedStringerOtherFields struct {
s string
t ptrStringer
S string
}func (*ptrStringer) BadWrap(x int, args ...interface{}) stringfunc (*ptrStringer) BadWrapf(x int, format string, args ...interface{}) stringTODO: Disable complaint about '0' for Go 1.10. To be fixed properly in 1.11. See issues 23598 and 23605.
func DisableErrorForFlag0()func (e errorer) Error() stringfunc (errorTest1) Error(...interface{}) stringfunc (errorTest2) Error(...interface{})func (errorTest3) Error()func (errorTest4) Error() intError is variadic user-define Println-like function. Calls to this func mustn't be checked for Println-like arguments, since variadic arguments type isn't interface{}.
func (ss *someStruct) Error(args ...func())Errorf is used by the test for a case in which the first parameter is not a format string.
func Errorf(i int, format string, args ...interface{})func (*BoolFormatter) Format(fmt.State, rune)func (FormatterVal) Format(fmt.State, rune)Log is non-variadic user-define Println-like function. Calls to this func must be skipped when checking for Println-like arguments.
func (ss *someStruct) Log(f func(), s string)func PointersToCompoundTypes()Printf is used by the test so we must declare it.
func Printf(format string, args ...interface{})This function never executes, but it serves as a simple test for the program. Test with make test.
func PrintfTests()Println is variadic user-defined Println-like function. Calls to this func must be checked for Println-like arguments.
func (ss *someStruct) Println(args ...interface{})Println is used by the test so we must declare it.
func Println(args ...interface{})func (stringer) String() stringfunc (*ptrStringer) String() stringfunc (p *recursivePtrStringer) String() stringfunc (s recursiveStringer) String() stringfunc (stringerarray) String() stringfunc UnexportedStringerOrError()func UnsafePointerPrintfTest()func (*ptrStringer) Warn(x int, args ...interface{}) stringfunc (p *ptrStringer) Warn2(x int, args ...interface{}) stringfunc (*ptrStringer) Warnf(x int, format string, args ...interface{}) stringfunc (p *ptrStringer) Warnf2(x int, format string, args ...interface{}) stringfunc (*ptrStringer) Wrap(x int, args ...interface{}) stringfunc (p *ptrStringer) Wrap2(x int, args ...interface{}) stringfunc (*ptrStringer) Wrapf(x int, format string, args ...interface{}) stringfunc (p *ptrStringer) Wrapf2(x int, format string, args ...interface{}) stringfunc (*ptrStringer) WrapfFalsePositive(x int, arg1 string, arg2 ...interface{}) stringIssue 26486.
func dbg(format string, args ...interface{})func (errorTest5) error()errorf is used by the test for a case in which the function accepts multiple string parameters before variadic arguments
func errorf(level string, format string, args ...interface{})log is variadic user-defined Println-like function. Calls to this func must be checked for Println-like arguments.
func (ss *someStruct) log(f func(), args ...interface{})multi is used by the test.
func multi() []interface{}printf is used by the test so we must declare it.
func printf(format string, args ...interface{})A function we use as a function value; it has no other purpose.
func someFunction()func someString() stringGenerated with Arrow