MCPcopy Index your code
hub / github.com/VirusTotal/vt-cli / StringReaderFromCmdArgs

Function StringReaderFromCmdArgs

utils/string_reader.go:128–134  ·  view source on GitHub ↗

StringReaderFromCmdArgs returns a string reader for reading the arguments passed in the command line. If the arguments consists in single hypen "-", they are read from stdin.

(args []string)

Source from the content-addressed store, hash-verified

126// passed in the command line. If the arguments consists in single hypen "-",
127// they are read from stdin.
128func StringReaderFromCmdArgs(args []string) StringReader {
129 if len(args) == 1 && args[0] == "-" {
130 return NewStringIOReader(os.Stdin)
131 } else {
132 return NewStringArrayReader(args)
133 }
134}

Callers 15

NewAnalysisCmdFunction · 0.92
NewHuntingRulesetCmdFunction · 0.92
NewFileCmdFunction · 0.92
NewIOCStreamCmdFunction · 0.92
NewRetrohuntCmdFunction · 0.92
NewMonitorCmdFunction · 0.92
NewThreatProfileCmdFunction · 0.92
NewGroupCmdFunction · 0.92
NewIPCmdFunction · 0.92
NewCollectionCmdFunction · 0.92
NewCollectionCreateCmdFunction · 0.92

Calls 2

NewStringIOReaderFunction · 0.85
NewStringArrayReaderFunction · 0.85

Tested by

no test coverage detected