INNER CODE UNIT · Go
livePrefix
c-bata/go-prompt · _example/http-prompt/main.go:95
func livePrefix() (string, bool) {
if ctx.url.Path == "/" {
return "", false
}
return ctx.url.String() + "> ", true
}
func executor(in string) {
in = strings.TrimSpace(in)
var method, body string
blocks := strings.Split(in, " ")
switch blocks[0] {
case "exit":
fmt.Println("Bye!")
os.Exit(0)
case "cd":
if len(blocks) < 2 {