// Command corestack-goose authors provider-local SQL and Go migrations offline. package main import ( "context" "fmt" "os" urfavecli "github.com/urfave/cli/v3" "go.auvem.com/corestack/cmd/corestack-goose/internal/authoring" ) func main() { if err := command().Run(context.Background(), os.Args); err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(1) } } func command() *urfavecli.Command { root := &urfavecli.Command{Name: "corestack-goose", Usage: "Author migrations before deployment"} for _, name := range []string{"create", "fix"} { root.Commands = append(root.Commands, &urfavecli.Command{Name: name, Flags: []urfavecli.Flag{&urfavecli.StringFlag{Name: "dir", Required: true}}, Action: func(_ context.Context, cmd *urfavecli.Command) error { if name == "create" { if cmd.NArg() != 2 { return fmt.Errorf("usage: create --dir