MCPcopy Create free account
hub / github.com/ZeppelinMC/Zeppelin / GetFlag

Function GetFlag

util/console/console.go:25–36  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

23var Console console
24
25func GetFlag(name string) (string, bool) {
26 name = "--" + name + "="
27 for _, a := range os.Args {
28 if i := strings.Index(a, name); i == 0 {
29 if len(name)+i < len(a) {
30 return a[len(name)+i:], true
31 }
32 }
33 }
34
35 return "", false
36}
37
38func StartConsole(srv *server.Server) {
39 var line string

Callers 1

mainFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected