fmt.Formatter interface
(f fmt.State, c rune)
| 122 | |
| 123 | // fmt.Formatter interface |
| 124 | func (nm LNumber) Format(f fmt.State, c rune) { |
| 125 | switch c { |
| 126 | case 'q', 's': |
| 127 | defaultFormat(nm.String(), f, c) |
| 128 | case 'b', 'c', 'd', 'o', 'x', 'X', 'U': |
| 129 | defaultFormat(int64(nm), f, c) |
| 130 | case 'e', 'E', 'f', 'F', 'g', 'G': |
| 131 | defaultFormat(float64(nm), f, c) |
| 132 | case 'i': |
| 133 | defaultFormat(int64(nm), f, 'd') |
| 134 | default: |
| 135 | if isInteger(nm) { |
| 136 | defaultFormat(int64(nm), f, c) |
| 137 | } else { |
| 138 | defaultFormat(float64(nm), f, c) |
| 139 | } |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | type LTable struct { |
| 144 | Metatable LValue |
nothing calls this directly
no test coverage detected