github.com/traefik/yaegi@v0.15.1/stdlib/go1_20_fmt.go (about) 1 // Code generated by 'yaegi extract fmt'. DO NOT EDIT. 2 3 //go:build go1.20 4 // +build go1.20 5 6 package stdlib 7 8 import ( 9 "fmt" 10 "reflect" 11 ) 12 13 func init() { 14 Symbols["fmt/fmt"] = map[string]reflect.Value{ 15 // function, constant and variable definitions 16 "Append": reflect.ValueOf(fmt.Append), 17 "Appendf": reflect.ValueOf(fmt.Appendf), 18 "Appendln": reflect.ValueOf(fmt.Appendln), 19 "Errorf": reflect.ValueOf(fmt.Errorf), 20 "FormatString": reflect.ValueOf(fmt.FormatString), 21 "Fprint": reflect.ValueOf(fmt.Fprint), 22 "Fprintf": reflect.ValueOf(fmt.Fprintf), 23 "Fprintln": reflect.ValueOf(fmt.Fprintln), 24 "Fscan": reflect.ValueOf(fmt.Fscan), 25 "Fscanf": reflect.ValueOf(fmt.Fscanf), 26 "Fscanln": reflect.ValueOf(fmt.Fscanln), 27 "Print": reflect.ValueOf(fmt.Print), 28 "Printf": reflect.ValueOf(fmt.Printf), 29 "Println": reflect.ValueOf(fmt.Println), 30 "Scan": reflect.ValueOf(fmt.Scan), 31 "Scanf": reflect.ValueOf(fmt.Scanf), 32 "Scanln": reflect.ValueOf(fmt.Scanln), 33 "Sprint": reflect.ValueOf(fmt.Sprint), 34 "Sprintf": reflect.ValueOf(fmt.Sprintf), 35 "Sprintln": reflect.ValueOf(fmt.Sprintln), 36 "Sscan": reflect.ValueOf(fmt.Sscan), 37 "Sscanf": reflect.ValueOf(fmt.Sscanf), 38 "Sscanln": reflect.ValueOf(fmt.Sscanln), 39 40 // type definitions 41 "Formatter": reflect.ValueOf((*fmt.Formatter)(nil)), 42 "GoStringer": reflect.ValueOf((*fmt.GoStringer)(nil)), 43 "ScanState": reflect.ValueOf((*fmt.ScanState)(nil)), 44 "Scanner": reflect.ValueOf((*fmt.Scanner)(nil)), 45 "State": reflect.ValueOf((*fmt.State)(nil)), 46 "Stringer": reflect.ValueOf((*fmt.Stringer)(nil)), 47 48 // interface wrapper definitions 49 "_Formatter": reflect.ValueOf((*_fmt_Formatter)(nil)), 50 "_GoStringer": reflect.ValueOf((*_fmt_GoStringer)(nil)), 51 "_ScanState": reflect.ValueOf((*_fmt_ScanState)(nil)), 52 "_Scanner": reflect.ValueOf((*_fmt_Scanner)(nil)), 53 "_State": reflect.ValueOf((*_fmt_State)(nil)), 54 "_Stringer": reflect.ValueOf((*_fmt_Stringer)(nil)), 55 } 56 } 57 58 // _fmt_Formatter is an interface wrapper for Formatter type 59 type _fmt_Formatter struct { 60 IValue interface{} 61 WFormat func(f fmt.State, verb rune) 62 } 63 64 func (W _fmt_Formatter) Format(f fmt.State, verb rune) { 65 W.WFormat(f, verb) 66 } 67 68 // _fmt_GoStringer is an interface wrapper for GoStringer type 69 type _fmt_GoStringer struct { 70 IValue interface{} 71 WGoString func() string 72 } 73 74 func (W _fmt_GoStringer) GoString() string { 75 return W.WGoString() 76 } 77 78 // _fmt_ScanState is an interface wrapper for ScanState type 79 type _fmt_ScanState struct { 80 IValue interface{} 81 WRead func(buf []byte) (n int, err error) 82 WReadRune func() (r rune, size int, err error) 83 WSkipSpace func() 84 WToken func(skipSpace bool, f func(rune) bool) (token []byte, err error) 85 WUnreadRune func() error 86 WWidth func() (wid int, ok bool) 87 } 88 89 func (W _fmt_ScanState) Read(buf []byte) (n int, err error) { 90 return W.WRead(buf) 91 } 92 func (W _fmt_ScanState) ReadRune() (r rune, size int, err error) { 93 return W.WReadRune() 94 } 95 func (W _fmt_ScanState) SkipSpace() { 96 W.WSkipSpace() 97 } 98 func (W _fmt_ScanState) Token(skipSpace bool, f func(rune) bool) (token []byte, err error) { 99 return W.WToken(skipSpace, f) 100 } 101 func (W _fmt_ScanState) UnreadRune() error { 102 return W.WUnreadRune() 103 } 104 func (W _fmt_ScanState) Width() (wid int, ok bool) { 105 return W.WWidth() 106 } 107 108 // _fmt_Scanner is an interface wrapper for Scanner type 109 type _fmt_Scanner struct { 110 IValue interface{} 111 WScan func(state fmt.ScanState, verb rune) error 112 } 113 114 func (W _fmt_Scanner) Scan(state fmt.ScanState, verb rune) error { 115 return W.WScan(state, verb) 116 } 117 118 // _fmt_State is an interface wrapper for State type 119 type _fmt_State struct { 120 IValue interface{} 121 WFlag func(c int) bool 122 WPrecision func() (prec int, ok bool) 123 WWidth func() (wid int, ok bool) 124 WWrite func(b []byte) (n int, err error) 125 } 126 127 func (W _fmt_State) Flag(c int) bool { 128 return W.WFlag(c) 129 } 130 func (W _fmt_State) Precision() (prec int, ok bool) { 131 return W.WPrecision() 132 } 133 func (W _fmt_State) Width() (wid int, ok bool) { 134 return W.WWidth() 135 } 136 func (W _fmt_State) Write(b []byte) (n int, err error) { 137 return W.WWrite(b) 138 } 139 140 // _fmt_Stringer is an interface wrapper for Stringer type 141 type _fmt_Stringer struct { 142 IValue interface{} 143 WString func() string 144 } 145 146 func (W _fmt_Stringer) String() string { 147 if W.WString == nil { 148 return "" 149 } 150 return W.WString() 151 }