Help us shape the future of Go! Take the 2026 Go Developer Survey

repair

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 20, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

DEPRECATED: This package is deprecated. Use parable-bloom/tools/level-builder instead. Future versions will port this functionality to the new CLI.

Index

Constants

This section is empty.

Variables

View Source
var LevelRepairCmd = &cobra.Command{
	Use:   "level-repair",
	Short: "Repair corrupted level JSON files by regenerating them",
	Long: `Scan a levels directory and regenerate any files that fail to parse.
This helps recover from partial writes or corrupted files produced by earlier runs.`,
	Run: func(cmd *cobra.Command, _args []string) {
		isVerbose := utils.IsVerbose(cmd)
		log.Start("Repairing level files (scan + regenerate)")

		directory, _ := cmd.Flags().GetString("directory")
		overwrite, _ := cmd.Flags().GetBool("overwrite")
		dryRun, _ := cmd.Flags().GetBool("dry-run")

		if directory == "" {
			directory = "assets/levels"
		}

		repairDirectory(directory, overwrite, dryRun, isVerbose)
	},
}

LevelRepairCmd repairs corrupted or truncated level files by regenerating them.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL