Set updates the value of the allowed format.
(s string)
| 96 | |
| 97 | // Set updates the value of the allowed format. |
| 98 | func (f *AllowedFormat) Set(s string) error { |
| 99 | switch s { |
| 100 | case "logfmt", "json": |
| 101 | f.s = s |
| 102 | default: |
| 103 | return fmt.Errorf("unrecognized log format %q", s) |
| 104 | } |
| 105 | return nil |
| 106 | } |
| 107 | |
| 108 | // Config is a struct containing configurable settings for the logger |
| 109 | type Config struct { |
nothing calls this directly
no outgoing calls
no test coverage detected