diff --git a/cmd/goshot/main.go b/cmd/goshot/main.go index 21e842e..5494637 100644 --- a/cmd/goshot/main.go +++ b/cmd/goshot/main.go @@ -8,24 +8,62 @@ import ( "image/png" "io" "os" + "path/filepath" "strings" "github.com/atotto/clipboard" + "github.com/charmbracelet/lipgloss" "github.com/spf13/cobra" + "github.com/spf13/pflag" "github.com/watzon/goshot/pkg/background" "github.com/watzon/goshot/pkg/chrome" "github.com/watzon/goshot/pkg/fonts" "github.com/watzon/goshot/pkg/render" "github.com/watzon/goshot/pkg/syntax" "github.com/watzon/goshot/pkg/version" + "golang.org/x/text/cases" + "golang.org/x/text/language" + cliflag "k8s.io/component-base/cli/flag" +) + +// Styles defines our CLI styles +var ( + styles = struct { + title lipgloss.Style + subtitle lipgloss.Style + error lipgloss.Style + success lipgloss.Style + info lipgloss.Style + groupTitle lipgloss.Style + }{ + title: lipgloss.NewStyle(). + Bold(true). + Foreground(lipgloss.AdaptiveColor{Light: "#d7008f", Dark: "#FF79C6"}). + MarginBottom(1), + subtitle: lipgloss.NewStyle(). + Foreground(lipgloss.AdaptiveColor{Light: "#7e3ff2", Dark: "#BD93F9"}). + MarginBottom(1), + error: lipgloss.NewStyle(). + Bold(true). + Foreground(lipgloss.AdaptiveColor{Light: "#d70000", Dark: "#FF5555"}), + success: lipgloss.NewStyle(). + Bold(true). + Foreground(lipgloss.AdaptiveColor{Light: "#FFFFFF", Dark: "#FFFFFF"}). + Background(lipgloss.AdaptiveColor{Light: "#2E7D32", Dark: "#388E3C"}), + info: lipgloss.NewStyle(). + Foreground(lipgloss.AdaptiveColor{Light: "#0087af", Dark: "#8BE9FD"}), + groupTitle: lipgloss.NewStyle(). + Bold(true). + Foreground(lipgloss.AdaptiveColor{Light: "#d75f00", Dark: "#FFB86C"}), + } ) type Config struct { // Interactive mode Interactive bool - Input string - // Output options + // Input/Output options + Input string OutputFile string ToClipboard bool FromClipboard bool @@ -82,75 +120,174 @@ func main() { var config Config rootCmd := &cobra.Command{ - Use: "goshot [flags] [file]", - Short: "Goshot is a powerful tool for creating beautiful code screenshots with customizable window chrome, syntax highlighting, and backgrounds.", + Use: "goshot [file] [flags]", + Short: styles.subtitle.Render("Create beautiful code screenshots with customizable styling"), + Long: styles.title.Render("Goshot - Code Screenshot Generator") + "\n" + + styles.info.Render("A powerful tool for creating beautiful code screenshots with customizable window chrome,\n"+ + "syntax highlighting, and backgrounds."), + Args: cobra.MaximumNArgs(1), + DisableFlagParsing: false, + TraverseChildren: true, Run: func(cmd *cobra.Command, args []string) { if config.Interactive { - fmt.Println("Interactive mode is coming soon!") + fmt.Println(styles.error.Render("Interactive mode is coming soon!")) os.Exit(1) } - if err := renderImage(&config, args); err != nil { - fmt.Fprintln(os.Stderr, err) + if err := renderImage(&config, true, args); err != nil { + fmt.Fprintln(os.Stderr, styles.error.Render(fmt.Sprintf("Error: %v", err))) os.Exit(1) } }, } - // Interactive mode - rootCmd.Flags().BoolVarP(&config.Interactive, "interactive", "i", false, "Interactive mode") + rfs := cliflag.NamedFlagSets{} + rfg := map[*pflag.FlagSet]string{} + + appearanceFlagSet := rfs.FlagSet("appearance") + outputFlagSet := rfs.FlagSet("output") + layoutFlagSet := rfs.FlagSet("layout") + gradientFlagSet := rfs.FlagSet("gradient") + shadowFlagSet := rfs.FlagSet("shadow") // Output flags - rootCmd.Flags().StringVarP(&config.OutputFile, "output", "o", "output.png", "Write output image to specific location instead of cwd") - rootCmd.Flags().BoolVarP(&config.ToClipboard, "to-clipboard", "c", false, "Copy the output image to clipboard") - rootCmd.Flags().BoolVar(&config.FromClipboard, "from-clipboard", false, "Read input from clipboard") - rootCmd.Flags().BoolVarP(&config.ToStdout, "to-stdout", "s", false, "Write output to stdout") + outputFlagSet.StringVarP(&config.OutputFile, "output", "o", "output.png", "Write output image to specific location instead of cwd") + outputFlagSet.BoolVarP(&config.ToClipboard, "to-clipboard", "c", false, "Copy the output image to clipboard") + outputFlagSet.BoolVar(&config.FromClipboard, "from-clipboard", false, "Read input from clipboard") + outputFlagSet.BoolVarP(&config.ToStdout, "to-stdout", "s", false, "Write output to stdout") + rootCmd.Flags().AddFlagSet(outputFlagSet) + rfg[outputFlagSet] = "output" + + // Interactive mode + appearanceFlagSet.BoolVarP(&config.Interactive, "interactive", "i", false, "Interactive mode") // Appearance flags - rootCmd.Flags().StringVarP(&config.WindowChrome, "chrome", "C", "mac", "Chrome style. Available styles: mac, windows, gnome") - rootCmd.Flags().StringVarP(&config.ChromeThemeName, "chrome-theme", "T", "", "Chrome theme name") - rootCmd.Flags().BoolVarP(&config.DarkMode, "dark-mode", "d", false, "Use dark mode") - rootCmd.Flags().StringVarP(&config.Theme, "theme", "t", "dracula", "The syntax highlight theme. It can be a theme name or path to a .tmTheme file") - rootCmd.Flags().StringVarP(&config.Language, "language", "l", "", "The language for syntax highlighting. You can use full name (\"Rust\") or file extension (\"rs\")") - rootCmd.Flags().StringVarP(&config.Font, "font", "f", "", "The fallback font list. eg. 'Hack; SimSun=31'") - rootCmd.Flags().StringVarP(&config.BackgroundColor, "background", "b", "#aaaaff", "Background color of the image") - rootCmd.Flags().StringVar(&config.BackgroundImage, "background-image", "", "Background image") - rootCmd.Flags().StringVar(&config.BackgroundImageFit, "background-image-fit", "cover", "Background image fit mode. Available modes: contain, cover, fill, stretch, tile") - rootCmd.Flags().BoolVar(&config.ShowLineNumbers, "no-line-number", false, "Hide the line number") - rootCmd.Flags().Float64Var(&config.CornerRadius, "corner-radius", 10.0, "Corner radius of the image") - rootCmd.Flags().BoolVar(&config.NoWindowControls, "no-window-controls", false, "Hide the window controls") - rootCmd.Flags().StringVar(&config.WindowTitle, "window-title", "", "Show window title") - rootCmd.Flags().Float64Var(&config.WindowCornerRadius, "window-corner-radius", 10, "Corner radius of the window") + appearanceFlagSet.StringVarP(&config.WindowChrome, "chrome", "C", "mac", "Chrome style (mac, windows, gnome)") + appearanceFlagSet.StringVarP(&config.ChromeThemeName, "chrome-theme", "T", "", "Chrome theme name") + appearanceFlagSet.BoolVarP(&config.DarkMode, "dark-mode", "d", false, "Use dark mode") + appearanceFlagSet.StringVarP(&config.Theme, "theme", "t", "dracula", "Syntax highlight theme (name or .tmTheme file)") + appearanceFlagSet.StringVarP(&config.Language, "language", "l", "", "Language for syntax highlighting (e.g., 'Rust' or 'rs')") + appearanceFlagSet.StringVarP(&config.Font, "font", "f", "", "Fallback font list (e.g., 'Hack; SimSun=31')") + appearanceFlagSet.StringVarP(&config.BackgroundColor, "background", "b", "#aaaaff", "Background color") + appearanceFlagSet.StringVar(&config.BackgroundImage, "background-image", "", "Background image path") + appearanceFlagSet.StringVar(&config.BackgroundImageFit, "background-image-fit", "cover", "Background image fit (contain, cover, fill, stretch, tile)") + appearanceFlagSet.BoolVar(&config.ShowLineNumbers, "no-line-number", false, "Hide line numbers") + appearanceFlagSet.Float64Var(&config.CornerRadius, "corner-radius", 10.0, "Corner radius of the image") + appearanceFlagSet.BoolVar(&config.NoWindowControls, "no-window-controls", false, "Hide window controls") + appearanceFlagSet.StringVar(&config.WindowTitle, "window-title", "", "Window title") + appearanceFlagSet.Float64Var(&config.WindowCornerRadius, "window-corner-radius", 10, "Corner radius of the window") + appearanceFlagSet.StringVar(&config.HighlightLines, "highlight-lines", "", "Lines to highlight (e.g., '1-3;4')") + rootCmd.Flags().AddFlagSet(appearanceFlagSet) + rfg[appearanceFlagSet] = "appearance" + + // Layout flags + layoutFlagSet.IntVar(&config.TabWidth, "tab-width", 4, "Tab width") + layoutFlagSet.IntVar(&config.StartLine, "start-line", 1, "Start line number") + layoutFlagSet.IntVar(&config.EndLine, "end-line", 0, "End line number") + layoutFlagSet.IntVar(&config.LinePadding, "line-pad", 2, "Padding between lines") + layoutFlagSet.IntVar(&config.PadHoriz, "pad-horiz", 80, "Horizontal padding") + layoutFlagSet.IntVar(&config.PadVert, "pad-vert", 100, "Vertical padding") + layoutFlagSet.IntVar(&config.CodePadTop, "code-pad-top", 10, "Code top padding") + layoutFlagSet.IntVar(&config.CodePadBottom, "code-pad-bottom", 10, "Code bottom padding") + layoutFlagSet.IntVar(&config.CodePadLeft, "code-pad-left", 10, "Code left padding") + layoutFlagSet.IntVar(&config.CodePadRight, "code-pad-right", 10, "Code right padding") + rootCmd.Flags().AddFlagSet(layoutFlagSet) + rfg[layoutFlagSet] = "layout" // Gradient flags - rootCmd.Flags().StringVar(&config.GradientType, "gradient-type", "", "Gradient type. Available types: linear, radial, angular, diamond, spiral, square, star") - rootCmd.Flags().StringArrayVar(&config.GradientStops, "gradient-stop", []string{"#232323;0", "#383838;100"}, "Gradient stops. eg. '--gradient-stop '#ff0000;0' --gradient-stop '#00ff00;100'") - rootCmd.Flags().Float64Var(&config.GradientAngle, "gradient-angle", 45, "Gradient angle in degrees") - rootCmd.Flags().Float64Var(&config.GradientCenterX, "gradient-center-x", 0.5, "Center X of the gradient") - rootCmd.Flags().Float64Var(&config.GradientCenterY, "gradient-center-y", 0.5, "Center Y of the gradient") - rootCmd.Flags().Float64Var(&config.GradientIntensity, "gradient-intensity", 5, "Intensity modifier for special gradients") - - // Padding and layout flags - rootCmd.Flags().IntVar(&config.TabWidth, "tab-width", 4, "Tab width") - rootCmd.Flags().IntVar(&config.StartLine, "start-line", 1, "Line to start from") - rootCmd.Flags().IntVar(&config.EndLine, "end-line", 0, "Line to end at") - rootCmd.Flags().IntVar(&config.LinePadding, "line-pad", 2, "Pad between lines") - rootCmd.Flags().IntVar(&config.PadHoriz, "pad-horiz", 80, "Pad horiz") - rootCmd.Flags().IntVar(&config.PadVert, "pad-vert", 100, "Pad vert") - rootCmd.Flags().IntVar(&config.CodePadTop, "code-pad-top", 10, "Add padding to the top of the code") - rootCmd.Flags().IntVar(&config.CodePadBottom, "code-pad-bottom", 10, "Add padding to the bottom of the code") - rootCmd.Flags().IntVar(&config.CodePadLeft, "code-pad-left", 10, "Add padding to the X axis of the code") - rootCmd.Flags().IntVar(&config.CodePadRight, "code-pad-right", 10, "Add padding to the X axis of the code") + gradientFlagSet.StringVar(&config.GradientType, "gradient-type", "", "Gradient type (linear, radial, angular, diamond, spiral, square, star)") + gradientFlagSet.StringArrayVar(&config.GradientStops, "gradient-stop", []string{"#232323;0", "#383838;100"}, "Gradient stops (--gradient-stop '#ff0000;0' --gradient-stop '#00ff00;100')") + gradientFlagSet.Float64Var(&config.GradientAngle, "gradient-angle", 45, "Gradient angle in degrees") + gradientFlagSet.Float64Var(&config.GradientCenterX, "gradient-center-x", 0.5, "Gradient center X") + gradientFlagSet.Float64Var(&config.GradientCenterY, "gradient-center-y", 0.5, "Gradient center Y") + gradientFlagSet.Float64Var(&config.GradientIntensity, "gradient-intensity", 5, "Gradient intensity") + rootCmd.Flags().AddFlagSet(gradientFlagSet) + rfg[gradientFlagSet] = "gradient" // Shadow flags - rootCmd.Flags().Float64Var(&config.ShadowBlurRadius, "shadow-blur", 0, "Blur radius of the shadow. (set it to 0 to hide shadow)") - rootCmd.Flags().StringVar(&config.ShadowColor, "shadow-color", "#00000033", "Color of shadow") - rootCmd.Flags().Float64Var(&config.ShadowSpread, "shadow-spread", 0, "Spread radius of the shadow") - rootCmd.Flags().Float64Var(&config.ShadowOffsetX, "shadow-offset-x", 0, "Shadow's offset in X axis") - rootCmd.Flags().Float64Var(&config.ShadowOffsetY, "shadow-offset-y", 0, "Shadow's offset in Y axis") + shadowFlagSet.Float64Var(&config.ShadowBlurRadius, "shadow-blur", 0, "Shadow blur radius (0 to disable)") + shadowFlagSet.StringVar(&config.ShadowColor, "shadow-color", "#00000033", "Shadow color") + shadowFlagSet.Float64Var(&config.ShadowSpread, "shadow-spread", 0, "Shadow spread radius") + shadowFlagSet.Float64Var(&config.ShadowOffsetX, "shadow-offset-x", 0, "Shadow X offset") + shadowFlagSet.Float64Var(&config.ShadowOffsetY, "shadow-offset-y", 0, "Shadow Y offset") + rootCmd.Flags().AddFlagSet(shadowFlagSet) + rfg[shadowFlagSet] = "shadow" + + rootCmd.SetUsageFunc(func(cmd *cobra.Command) error { + fmt.Println(styles.subtitle.Render("Usage:")) + fmt.Printf(" %s [flags] [file]\n", cmd.Name()) + fmt.Println() + + // Flags by group + fmt.Println(styles.subtitle.Render("Flags:")) + flagStyle := lipgloss.NewStyle().Foreground(lipgloss.AdaptiveColor{Light: "#000000", Dark: "#50FA7B"}) + descStyle := lipgloss.NewStyle().Foreground(lipgloss.AdaptiveColor{Light: "#303030", Dark: "#F8F8F2"}) + defaultStyle := lipgloss.NewStyle().Foreground(lipgloss.AdaptiveColor{Light: "#666666", Dark: "#6272A4"}).Italic(true) + + for fs, name := range rfg { + // Print group title + fmt.Println(styles.groupTitle.Render(" " + cases.Title(language.English).String(name) + ":")) + + // Get all flags in this group + fs.VisitAll(func(f *pflag.Flag) { + // Format the flag name part + namePart := " " + if f.Shorthand != "" { + namePart += lipgloss.NewStyle(). + Bold(true). + Foreground(lipgloss.AdaptiveColor{Light: "#000000", Dark: "#FFFFFF"}). + Render(fmt.Sprintf("-%s, --%s", f.Shorthand, f.Name)) + } else { + namePart += lipgloss.NewStyle(). + Bold(true). + Foreground(lipgloss.AdaptiveColor{Light: "#000000", Dark: "#FFFFFF"}). + Render(fmt.Sprintf("--%s", f.Name)) + } + + // Add type if not a boolean + if f.Value.Type() != "bool" { + namePart += " " + defaultStyle.Render(f.Value.Type()) + } + + // Format description and default value + desc := f.Usage + if f.DefValue != "" && f.DefValue != "false" { + desc += defaultStyle.Render(fmt.Sprintf(" (default %q)", f.DefValue)) + } + + // Calculate padding + padding := 40 - lipgloss.Width(namePart) + if padding < 2 { + padding = 2 + } + + // Print the formatted flag line + fmt.Printf("%s%s%s\n", + namePart, + strings.Repeat(" ", padding), + descStyle.Render(desc), + ) + }) + fmt.Println() + } + + // Additional commands + if cmd.HasAvailableSubCommands() { + fmt.Println(styles.subtitle.Render("Additional Commands:")) + for _, subCmd := range cmd.Commands() { + if !subCmd.Hidden { + fmt.Printf(" %s%s%s\n", + flagStyle.Render(subCmd.Name()), + strings.Repeat(" ", 20-len(subCmd.Name())), + descStyle.Render(subCmd.Short), + ) + } + } + fmt.Println() + } - // Highlighting flags - rootCmd.Flags().StringVar(&config.HighlightLines, "highlight-lines", "", "Lines to highlight. eg. '1-3;4'") + return nil + }) // Additional utility commands rootCmd.AddCommand( @@ -186,12 +323,12 @@ func main() { ) if err := rootCmd.Execute(); err != nil { - fmt.Fprintln(os.Stderr, err) + fmt.Fprintln(os.Stderr, styles.error.Render(fmt.Sprintf("Error: %v", err))) os.Exit(1) } } -func renderImage(config *Config, args []string) error { +func renderImage(config *Config, echo bool, args []string) error { // Get the input code var code string var err error @@ -421,6 +558,10 @@ func renderImage(config *Config, args []string) error { if err != nil { return fmt.Errorf("failed to copy image to clipboard: %v", err) } + + if echo { + fmt.Println(styles.success.Render(" COPIED ") + " to clipboard") + } } if config.ToStdout { @@ -432,9 +573,40 @@ func renderImage(config *Config, args []string) error { return nil } - if err := render.SaveAsPNG(img, config.OutputFile); err != nil { + err = saveImage(img, config) + if err == nil { + if echo { + fmt.Println(styles.success.Render(" RENDERED ")) + } + } else { return fmt.Errorf("failed to save image: %v", err) } return nil } + +func saveImage(img image.Image, config *Config) error { + // If no output file is specified, use png as default + if config.OutputFile == "" { + config.OutputFile = "screenshot.png" + } + + // Get the extension from the filename + ext := strings.ToLower(filepath.Ext(config.OutputFile)) + if ext == "" { + ext = ".png" + config.OutputFile += ext + } + + // Save in the format matching the extension + switch ext { + case ".png": + return render.SaveAsPNG(img, config.OutputFile) + case ".jpg", ".jpeg": + return render.SaveAsJPEG(img, config.OutputFile) + case ".bmp": + return render.SaveAsBMP(img, config.OutputFile) + default: + return fmt.Errorf("unsupported file format: %s", ext) + } +} diff --git a/go.mod b/go.mod index b00669f..c615093 100644 --- a/go.mod +++ b/go.mod @@ -6,44 +6,34 @@ require ( github.com/atotto/clipboard v0.1.4 github.com/charmbracelet/lipgloss v1.0.0 github.com/disintegration/imaging v1.6.2 + github.com/spf13/pflag v1.0.5 + golang.org/x/text v0.20.0 ) require ( github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect - github.com/catppuccin/go v0.2.0 // indirect github.com/charmbracelet/x/ansi v0.4.5 // indirect - github.com/charmbracelet/x/exp/strings v0.0.0-20240722160745-212f7b056ed0 // indirect - github.com/charmbracelet/x/term v0.2.1 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/dustin/go-humanize v1.0.1 // indirect - github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/go-logr/logr v1.4.2 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/lucasb-eyer/go-colorful v1.2.0 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/mattn/go-localereader v0.0.1 // indirect - github.com/mattn/go-runewidth v0.0.16 // indirect - github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect - github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect - github.com/muesli/cancelreader v0.2.2 // indirect github.com/muesli/termenv v0.15.3-0.20240618155329-98d742f6907a // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/rivo/uniseg v0.4.7 // indirect - github.com/spf13/pflag v1.0.5 // indirect - golang.org/x/sync v0.9.0 // indirect golang.org/x/sys v0.27.0 // indirect - golang.org/x/text v0.20.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect + k8s.io/apimachinery v0.31.3 // indirect + k8s.io/klog/v2 v2.130.1 // indirect ) require ( github.com/alecthomas/chroma/v2 v2.14.0 - github.com/charmbracelet/bubbles v0.20.0 - github.com/charmbracelet/bubbletea v1.2.3 - github.com/charmbracelet/huh v0.6.0 github.com/dlclark/regexp2 v1.11.4 // indirect github.com/fogleman/gg v1.3.0 github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 github.com/spf13/cobra v1.8.1 github.com/stretchr/testify v1.9.0 golang.org/x/image v0.22.0 + k8s.io/component-base v0.31.3 ) diff --git a/go.sum b/go.sum index 45a7148..90233f7 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,3 @@ -github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= -github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= github.com/alecthomas/assert/v2 v2.7.0 h1:QtqSACNS3tF7oasA8CU6A6sXZSBDqnm7RfpLl9bZqbE= github.com/alecthomas/assert/v2 v2.7.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k= github.com/alecthomas/chroma/v2 v2.14.0 h1:R3+wzpnUArGcQz7fCETQBzO5n9IMNi13iIs46aU4V9E= @@ -10,35 +8,21 @@ github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= -github.com/catppuccin/go v0.2.0 h1:ktBeIrIP42b/8FGiScP9sgrWOss3lw0Z5SktRoithGA= -github.com/catppuccin/go v0.2.0/go.mod h1:8IHJuMGaUUjQM82qBrGNBv7LFq6JI3NnQCF6MOlZjpc= -github.com/charmbracelet/bubbles v0.20.0 h1:jSZu6qD8cRQ6k9OMfR1WlM+ruM8fkPWkHvQWD9LIutE= -github.com/charmbracelet/bubbles v0.20.0/go.mod h1:39slydyswPy+uVOHZ5x/GjwVAFkCsV8IIVy+4MhzwwU= -github.com/charmbracelet/bubbletea v1.2.3 h1:d9MdMsANIYZB5pE1KkRqaUV6GfsiWm+/9z4fTuGVm9I= -github.com/charmbracelet/bubbletea v1.2.3/go.mod h1:Qr6fVQw+wX7JkWWkVyXYk/ZUQ92a6XNekLXa3rR18MM= -github.com/charmbracelet/huh v0.6.0 h1:mZM8VvZGuE0hoDXq6XLxRtgfWyTI3b2jZNKh0xWmax8= -github.com/charmbracelet/huh v0.6.0/go.mod h1:GGNKeWCeNzKpEOh/OJD8WBwTQjV3prFAtQPpLv+AVwU= github.com/charmbracelet/lipgloss v1.0.0 h1:O7VkGDvqEdGi93X+DeqsQ7PKHDgtQfF8j8/O2qFMQNg= github.com/charmbracelet/lipgloss v1.0.0/go.mod h1:U5fy9Z+C38obMs+T+tJqst9VGzlOYGj4ri9reL3qUlo= github.com/charmbracelet/x/ansi v0.4.5 h1:LqK4vwBNaXw2AyGIICa5/29Sbdq58GbGdFngSexTdRM= github.com/charmbracelet/x/ansi v0.4.5/go.mod h1:dk73KoMTT5AX5BsX0KrqhsTqAnhZZoCBjs7dGWp4Ktw= -github.com/charmbracelet/x/exp/strings v0.0.0-20240722160745-212f7b056ed0 h1:qko3AQ4gK1MTS/de7F5hPGx6/k1u0w4TeYmBFwzYVP4= -github.com/charmbracelet/x/exp/strings v0.0.0-20240722160745-212f7b056ed0/go.mod h1:pBhA0ybfXv6hDjQUZ7hk1lVxBiUbupdw5R31yPUViVQ= -github.com/charmbracelet/x/term v0.2.1 h1:AQeHeLZ1OqSXhrAWpYUtZyX1T3zVxfpZuEQMIQaGIAQ= -github.com/charmbracelet/x/term v0.2.1/go.mod h1:oQ4enTYFV7QN4m0i9mzHrViD7TQKvNEEkHUMCmsxdUg= github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/disintegration/imaging v1.6.2 h1:w1LecBlG2Lnp8B3jk5zSuNqd7b4DXhcjwek1ei82L+c= github.com/disintegration/imaging v1.6.2/go.mod h1:44/5580QXChDfwIclfc/PCwrr44amcmDAg8hxG0Ewe4= github.com/dlclark/regexp2 v1.11.4 h1:rPYF9/LECdNymJufQKmri9gV604RvvABwgOA8un7yAo= github.com/dlclark/regexp2 v1.11.4/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= -github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= -github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f h1:Y/CXytFA4m6baUTXGLOoWe4PQhGxaX0KpnayAqC48p4= -github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f/go.mod h1:vw97MGsxSvLiUE2X8qFplwetxpGLQrlU1Q9AUEIzCaM= github.com/fogleman/gg v1.3.0 h1:/7zJX8F6AaYQc57WQCyN9cAIz+4bCJGO9B+dyW29am8= github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= @@ -49,21 +33,10 @@ github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69 github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4= -github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88= -github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= -github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4= -github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE= -github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 h1:ZK8zHtRHOkbHy6Mmr5D264iyp3TiX5OmNcI5cIARiQI= -github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6/go.mod h1:CJlz5H+gyd6CUWT45Oy4q24RdLyn7Md9Vj2/ldJBSIo= -github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA= -github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo= github.com/muesli/termenv v0.15.3-0.20240618155329-98d742f6907a h1:2MaM6YC3mGu54x+RKAA6JiFFHlHDY1UbkxqppT7wYOg= github.com/muesli/termenv v0.15.3-0.20240618155329-98d742f6907a/go.mod h1:hxSnBBYLK21Vtq/PHd0S2FYCxBXzBua8ov5s1RobyRQ= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -76,9 +49,6 @@ github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8 golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.22.0 h1:UtK5yLUzilVrkjMAZAZ34DXGpASN8i8pj8g+O+yd10g= golang.org/x/image v0.22.0/go.mod h1:9hPFhljd4zZ1GNSIZJ49sqbp45GKK9t6w+iXvGqZUz4= -golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= -golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= @@ -89,3 +59,9 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +k8s.io/apimachinery v0.31.3 h1:6l0WhcYgasZ/wk9ktLq5vLaoXJJr5ts6lkaQzgeYPq4= +k8s.io/apimachinery v0.31.3/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/component-base v0.31.3 h1:DMCXXVx546Rfvhj+3cOm2EUxhS+EyztH423j+8sOwhQ= +k8s.io/component-base v0.31.3/go.mod h1:xME6BHfUOafRgT0rGVBGl7TuSg8Z9/deT7qq6w7qjIU= +k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= +k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=