MCPcopy Index your code
hub / github.com/codingo/bbr / validateFlags

Function validateFlags

bbr.go:118–132  ·  view source on GitHub ↗

validateFlags validates if all the required flags are set

()

Source from the content-addressed store, hash-verified

116
117// validateFlags validates if all the required flags are set
118func validateFlags() error {
119 var err []string
120
121 if *target == "" {
122 err = append(err, "Target is required.")
123 }
124 if *templateFile == "" {
125 err = append(err, "Template file path is required.")
126 }
127 if len(err) > 0 {
128 return errors.New(strings.Join(err, "\n"))
129 }
130 return nil
131
132}
133
134func inputFlags(content []byte) {
135 reader := bufio.NewReader(os.Stdin)

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected