github.com/taubyte/tau-cli@v0.1.13-0.20240326000942-487f0d57edfc/prompts/messaging/prompts.go (about) 1 package messagingPrompts 2 3 import ( 4 messagingFlags "github.com/taubyte/tau-cli/flags/messaging" 5 "github.com/taubyte/tau-cli/prompts" 6 "github.com/urfave/cli/v2" 7 ) 8 9 func GetOrRequireAChannelMatch(ctx *cli.Context, prev ...string) string { 10 return prompts.GetOrRequireAMatch(ctx, ChannelMatch, prev...) 11 } 12 13 func GetMQTT(ctx *cli.Context, prev ...bool) bool { 14 return prompts.GetOrAskForBool(ctx, messagingFlags.MQTT.Name, MQTTPrompt, prev...) 15 } 16 17 func GetWebSocket(ctx *cli.Context, prev ...bool) bool { 18 return prompts.GetOrAskForBool(ctx, messagingFlags.WebSocket.Name, WebSocketPrompt, prev...) 19 }