MCPcopy Index your code
hub / github.com/aptly-dev/aptly / StringOrFileFlag

Struct StringOrFileFlag

cmd/string_or_file_flag.go:14–16  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

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.
14type StringOrFileFlag struct {
15 value string
16}
17
18func (s *StringOrFileFlag) String() string {
19 return s.value

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected