print

Imports

Imports #

"fmt"
logpkg "log"
"math"
"os"
"testing"
"unsafe"

Constants & Variables

embeddedStringerv var #

var embeddedStringerv embeddedStringer

nonemptyinterface var #

var nonemptyinterface = *ast.CallExpr

notPercentDV var #

var notPercentDV notPercentDStruct

notstringerarrayv var #

var notstringerarrayv notstringerarray

notstringerv var #

var notstringerv notstringer

percentDV var #

var percentDV percentDStruct

percentSV var #

var percentSV percentSStruct

recursiveMapV var #

var recursiveMapV = *ast.CallExpr

recursiveSliceV var #

var recursiveSliceV = *ast.UnaryExpr

recursiveStruct1V var #

var recursiveStruct1V = *ast.UnaryExpr

recursiveStructV var #

var recursiveStructV = *ast.UnaryExpr

stringerarrayv var #

var stringerarrayv stringerarray

stringerv var #

var stringerv ptrStringer

Type Aliases

BoolFormatter type #

type BoolFormatter bool

FormatterVal type #

Formatter with value receiver

type FormatterVal bool

RecursiveMap type #

type RecursiveMap map[int]RecursiveMap

RecursiveSlice type #

type RecursiveSlice []RecursiveSlice

errorTest1 type #

Error methods that do not satisfy the Error interface and should be checked.

type errorTest1 int

errorTest2 type #

type errorTest2 int

errorTest3 type #

type errorTest3 int

errorTest4 type #

type errorTest4 int

errorTest5 type #

type errorTest5 int

notstringerarray type #

type notstringerarray [4]float64

ptrStringer type #

type ptrStringer float64

recursivePtrStringer type #

type recursivePtrStringer int

recursiveStringer type #

type recursiveStringer int

stringer type #

type stringer int

stringerarray type #

type stringerarray [4]float64

Interfaces

errorInterface interface #

type errorInterface interface {
error
ExtraMethod()
}

Structs

RecursiveStruct struct #

type RecursiveStruct struct {
next *RecursiveStruct
}

RecursiveStruct1 struct #

type RecursiveStruct1 struct {
next *RecursiveStruct2
}

RecursiveStruct2 struct #

type RecursiveStruct2 struct {
next *RecursiveStruct1
}

embeddedStringer struct #

type embeddedStringer struct {
foo string
ptrStringer
bar int
}

errorer struct #

type errorer struct {

}

notPercentDStruct struct #

A data type we cannot print correctly with "%d".

type notPercentDStruct struct {
a int
b []byte
c bool
}

notstringer struct #

type notstringer struct {
f float64
}

percentDStruct struct #

A data type we can print with "%d".

type percentDStruct struct {
a int
b []byte
c *float64
}

percentSStruct struct #

A data type we can print with "%s".

type percentSStruct struct {
a string
b []byte
C stringerarray
}

someStruct struct #

type someStruct struct {

}

unexportedCustomError struct #

type unexportedCustomError struct {
e errorer
}

unexportedError struct #

Issue 17798: unexported error cannot be formatted.

type unexportedError struct {
e error
}

unexportedErrorInterface struct #

type unexportedErrorInterface struct {
e errorInterface
}

unexportedErrorOtherFields struct #

type unexportedErrorOtherFields struct {
s string
e error
S string
}

unexportedInterface struct #

type unexportedInterface struct {
f interface{}
}

unexportedStringer struct #

Issue 17798: unexported ptrStringer cannot be formatted.

type unexportedStringer struct {
t ptrStringer
}

unexportedStringerOtherFields struct #

type unexportedStringerOtherFields struct {
s string
t ptrStringer
S string
}

Functions

BadWrap method #

func (*ptrStringer) BadWrap(x int, args ...interface{}) string

BadWrapf method #

func (*ptrStringer) BadWrapf(x int, format string, args ...interface{}) string

DisableErrorForFlag0 function #

TODO: Disable complaint about '0' for Go 1.10. To be fixed properly in 1.11. See issues 23598 and 23605.

func DisableErrorForFlag0()

Error method #

func (e errorer) Error() string

Error method #

func (errorTest1) Error(...interface{}) string

Error method #

func (errorTest2) Error(...interface{})

Error method #

func (errorTest3) Error()

Error method #

func (errorTest4) Error() int

Error method #

Error 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 function #

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{})

Format method #

func (*BoolFormatter) Format(fmt.State, rune)

Format method #

func (FormatterVal) Format(fmt.State, rune)

Log method #

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)

PointersToCompoundTypes function #

func PointersToCompoundTypes()

Printf function #

Printf is used by the test so we must declare it.

func Printf(format string, args ...interface{})

PrintfTests function #

This function never executes, but it serves as a simple test for the program. Test with make test.

func PrintfTests()

Println method #

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 function #

Println is used by the test so we must declare it.

func Println(args ...interface{})

String method #

func (stringer) String() string

String method #

func (*ptrStringer) String() string

String method #

func (p *recursivePtrStringer) String() string

String method #

func (s recursiveStringer) String() string

String method #

func (stringerarray) String() string

UnexportedStringerOrError function #

func UnexportedStringerOrError()

UnsafePointerPrintfTest function #

func UnsafePointerPrintfTest()

Warn method #

func (*ptrStringer) Warn(x int, args ...interface{}) string

Warn2 method #

func (p *ptrStringer) Warn2(x int, args ...interface{}) string

Warnf method #

func (*ptrStringer) Warnf(x int, format string, args ...interface{}) string

Warnf2 method #

func (p *ptrStringer) Warnf2(x int, format string, args ...interface{}) string

Wrap method #

func (*ptrStringer) Wrap(x int, args ...interface{}) string

Wrap2 method #

func (p *ptrStringer) Wrap2(x int, args ...interface{}) string

Wrapf method #

func (*ptrStringer) Wrapf(x int, format string, args ...interface{}) string

Wrapf2 method #

func (p *ptrStringer) Wrapf2(x int, format string, args ...interface{}) string

WrapfFalsePositive method #

func (*ptrStringer) WrapfFalsePositive(x int, arg1 string, arg2 ...interface{}) string

dbg function #

Issue 26486.

func dbg(format string, args ...interface{})

error method #

func (errorTest5) error()

errorf function #

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 method #

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 function #

multi is used by the test.

func multi() []interface{}

printf function #

printf is used by the test so we must declare it.

func printf(format string, args ...interface{})

someFunction function #

A function we use as a function value; it has no other purpose.

func someFunction()

someString function #

func someString() string

Generated with Arrow