5 // Wrapf is a printf wrapper.
6 func Wrapf(format string, args ...interface{}) { // want Wrapf:"printfWrapper"
7 fmt.Sprintf(format, args...)
10 // Wrap is a print wrapper.
11 func Wrap(args ...interface{}) { // want Wrap:"printWrapper"
15 // NoWrap is not a wrapper.
16 func NoWrap(format string, args ...interface{}) {
19 // Wrapf2 is another printf wrapper.
20 func Wrapf2(format string, args ...interface{}) string { // want Wrapf2:"printfWrapper"
22 // This statement serves as an assertion that this function is a
23 // printf wrapper and that calls to it should be checked
24 // accordingly, even though the delegation below is obscured by
25 // the "("+format+")" operations.
27 fmt.Sprintf(format, args...)
30 // Effectively a printf delegation,
31 // but the printf checker can't see it.
32 return fmt.Sprintf("("+format+")", args...)