(args ...any)
| 17 | } |
| 18 | |
| 19 | func (self *FakeFieldLogger) Error(args ...any) { |
| 20 | if len(args) != 1 { |
| 21 | panic("Expected exactly one argument to FakeFieldLogger.Error") |
| 22 | } |
| 23 | |
| 24 | switch arg := args[0].(type) { |
| 25 | case error: |
| 26 | self.loggedErrors = append(self.loggedErrors, arg.Error()) |
| 27 | case string: |
| 28 | self.loggedErrors = append(self.loggedErrors, arg) |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | func (self *FakeFieldLogger) Errorf(format string, args ...any) { |
| 33 | msg := fmt.Sprintf(format, args...) |
no outgoing calls