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

Function inputFlags

bbr.go:134–152  ·  view source on GitHub ↗
(content []byte)

Source from the content-addressed store, hash-verified

132}
133
134func inputFlags(content []byte) {
135 reader := bufio.NewReader(os.Stdin)
136 if *username == "" && bytes.Contains(content, []byte("_username_")) {
137 fmt.Print("A _username_ is used in this template, please specify: ")
138 *username, _ = reader.ReadString('\n')
139 *username = strings.TrimSpace(*username)
140 }
141 if *researcher == "" && bytes.Contains(content, []byte("_researcher_")) {
142 fmt.Print("A _researcher_ is used in this template, please specify: ")
143 *researcher, _ = reader.ReadString('\n')
144 *researcher = strings.TrimSpace(*researcher)
145
146 }
147 if *program == "" && bytes.Contains(content, []byte("_program_")) {
148 fmt.Print("A _program_ is used in this template, please specify: ")
149 *program, _ = reader.ReadString('\n')
150 *program = strings.TrimSpace(*program)
151 }
152}
153
154// checkError if error is not nil and exiting if error found
155func checkError(err error) {

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected