StringOrFileFlag is a custom flag type that can handle both string input and file input. If the input starts with '@', it is treated as a filename and the contents are read from the file. If the input is '@-', the contents are read from stdin.
| 12 | // If the input starts with '@', it is treated as a filename and the contents are read from the file. |
| 13 | // If the input is '@-', the contents are read from stdin. |
| 14 | type StringOrFileFlag struct { |
| 15 | value string |
| 16 | } |
| 17 | |
| 18 | func (s *StringOrFileFlag) String() string { |
| 19 | return s.value |
nothing calls this directly
no outgoing calls
no test coverage detected