Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AddCmd = &cli.Command{ Name: "add", Usage: "Add a mod or resource", Commands: []*cli.Command{ addModCmd, addResourceCmd, addDatapackCmd, }, Action: func(ctx context.Context, cli *cli.Command) error { return addModCmd.Action(ctx, cli) }, }
View Source
var BuildCmd = &cli.Command{ Name: "build", Usage: "Build the project", Action: func(context.Context, *cli.Command) error { log.Info().Msg("Building the project...") return nil }, }
View Source
var CheckCmd = &cli.Command{ Name: "check", Usage: "Check integrity", Action: func(context.Context, *cli.Command) error { log.Info().Msg("Checking integrity...") return nil }, }
View Source
var Commands = []*cli.Command{ NewCmd, AddCmd, RemoveCmd, UpdateCmd, CheckCmd, BuildCmd, RunCmd, ExportCmd, ImportCmd, SearchCmd, }
View Source
var ExportCmd = &cli.Command{ Name: "export", Usage: "Export integration package", Flags: []cli.Flag{ &cli.StringFlag{ Name: "format", Aliases: []string{"f"}, Usage: "Export format (gmlpack, mrpack, etc.)", Value: "gmlpack", ValidateDefaults: true, }, &cli.StringFlag{ Name: "output", Aliases: []string{"o"}, Usage: "Output file path", Value: "output.gmlpack", TakesFile: true, ValidateDefaults: true, }, }, Action: func(ctx context.Context, cli *cli.Command) error { format := cli.String("format") output := cli.String("output") log.Info().Str("format", format).Str("output", output).Msg("Exporting integration package...") return nil }, }
View Source
var ImportCmd = &cli.Command{ Name: "import", Usage: "Import integration package", Action: func(ctx context.Context, cli *cli.Command) error { path := cli.Args().First() log.Info().Str("path", path).Msg("Importing integration package...") return nil }, }
View Source
var NewCmd = &cli.Command{ Name: "new", Usage: "Create a new project", Action: func(ctx context.Context, cli *cli.Command) error { path := cli.Args().First() log.Info().Str("path", path).Msg("Creating new project...") return nil }, }
View Source
var RemoveCmd = &cli.Command{ Name: "remove", Usage: "Remove a mod or resource", Commands: []*cli.Command{ removeModCmd, removeResourceCmd, removeDatapackCmd, }, Action: func(ctx context.Context, cli *cli.Command) error { return removeModCmd.Action(ctx, cli) }, }
View Source
var RunCmd = &cli.Command{ Name: "run", Usage: "Run the project", Action: func(ctx context.Context, cli *cli.Command) error { path := cli.Args().First() log.Info().Str("path", path).Msg("Running project...") return nil }, }
View Source
var SearchCmd = &cli.Command{ Name: "search", Usage: "Search for a mod or vanilla", Flags: []cli.Flag{ &cli.BoolFlag{ Name: "vanilla", Aliases: []string{"v"}, Usage: "Vanilla name to search", }, &cli.BoolFlag{ Name: "mod", Aliases: []string{"m"}, Usage: "Mod name to search", }, &cli.BoolFlag{ Name: "resource", Aliases: []string{"r"}, Usage: "Resource name to search", }, &cli.BoolFlag{ Name: "datapack", Aliases: []string{"d"}, Usage: "Datapack name to search", }, }, Action: func(ctx context.Context, cli *cli.Command) error { vanilla := cli.Bool("vanilla") mod := cli.Bool("mod") resource := cli.Bool("resource") datapack := cli.Bool("datapack") if !vanilla && !mod && !resource && !datapack { log.Debug(). Bool("vanilla", vanilla). Bool("mod", mod). Bool("resource", resource). Bool("datapack", datapack). Msg("No type specified. Defaulting to --mod.") mod = true } log.Info(). Bool("vanilla", vanilla). Bool("mod", mod). Bool("resource", resource). Bool("datapack", datapack). Msg("Searching for mod or vanilla...") return nil }, }
View Source
var UpdateCmd = &cli.Command{ Name: "update", Usage: "Update a mod or resource", Flags: []cli.Flag{ &cli.StringFlag{ Name: "vanilla", Aliases: []string{"v"}, Usage: "The vanilla version to be updated", }, }, Action: func(ctx context.Context, cli *cli.Command) error { vanilla := cli.String("vanilla") if vanilla != "" { log.Info().Str("vanilla", vanilla).Msg("Updating vanilla version...") } log.Info().Msg("Updating mod or resource...") return nil }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.