mirror of
https://github.com/hanzoai/service-template.git
synced 2026-10-30 18:22:53 +00:00
github.com/hanzoai/template existed only as loose files: no .git, no history, no remote. Sweeps that look for a .git directory could not see it, and an rm -rf would have destroyed it with nothing to recover from. Committed as-is; no source modified. NOTE: no remote. This is still one copy in one place.
34 lines
691 B
Go
34 lines
691 B
Go
// Command app is the operator CLI for the template service.
|
|
//
|
|
// Subcommands live in their own files. This binary is what you use to
|
|
// migrate, seed, or open a one-off shell — not to serve requests. For that,
|
|
// use appd.
|
|
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
)
|
|
|
|
func main() {
|
|
if len(os.Args) < 2 {
|
|
usage()
|
|
os.Exit(2)
|
|
}
|
|
switch os.Args[1] {
|
|
case "migrate":
|
|
fmt.Println("migrate: not implemented in skeleton; wire via hanzoai/base/tools/migrations")
|
|
case "seed":
|
|
fmt.Println("seed: not implemented in skeleton")
|
|
case "version":
|
|
fmt.Println("template dev")
|
|
default:
|
|
usage()
|
|
os.Exit(2)
|
|
}
|
|
}
|
|
|
|
func usage() {
|
|
fmt.Fprintln(os.Stderr, "usage: app <migrate|seed|version>")
|
|
}
|