in tools/go/gozip/main.go [48:81]
func validateFlags() {
if fdir == "" && finputFile == "" && fbaseDir == "" && foutput == "" {
flag.Usage()
os.Exit(0)
}
if foutput == "" {
flag.Usage()
panic("output file name is required")
}
if fdir == "" && finputFile == "" {
flag.Usage()
panic("file and path can't both be empty")
}
if fdir != "" && finputFile != "" {
flag.Usage()
panic("file and path are mutually exclusive")
}
if fbaseDir == "" && fdir != "" {
fbaseDir = fdir
}
if !strings.HasSuffix(fbaseDir, pathSeparator) {
fbaseDir = fbaseDir + pathSeparator
}
executablesMap = make(map[string]struct{}, len(executables))
for _, v := range executables {
executablesMap[v] = struct{}{}
}
}