Something went wrong. Try again.
Run multiple services in one command. Brings startup dependency support and autoreload with change detection.
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738// Package cli exposes Case commands without coupling them to os.Exit.package cli
import ( "fmt" "io")
const usage = `Case — local development process supervisor
Usage: casectl up [--no-ui] [-f case.yaml] casectl validate [-f case.yaml] casectl graph [-f case.yaml] [--dot] casectl help`
// Run dispatches one CLI command using injectable output streams.func Run(args []string, stdout io.Writer, stderr io.Writer) error { if len(args) == 0 { args = []string{"up"} }
switch args[0] { case "help", "-h", "--help": _, err := fmt.Fprint(stdout, usage) return err case "validate": return runValidate(args[1:], stdout, stderr) case "graph": return runGraph(args[1:], stdout, stderr) case "up": return runUp(args[1:], stdout, stderr) default: return fmt.Errorf("unknown command %q\n\n%s", args[0], usage) }}