cmd

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package cmd contains mindl CLI command implementations.

Index

Constants

This section is empty.

Variables

View Source
var Common = simplcli.SimplCLI{
	SubCmds: map[string]simplcli.SubCmd{
		"list":      {CommonList, "List available common tools"},
		"detail":    {CommonDetail, "Output details of common tools"},
		"bootstrap": {CommonBootstrap, "Bootstrap a common tool"},
	},
}

Common dispatches common subcommands.

View Source
var Debug = simplcli.SimplCLI{
	SubCmds: map[string]simplcli.SubCmd{
		"template-data": {DebugTemplateData, "Print the template data with example values"},
		"template":      {DebugTemplate, "Template the given string with example values"},
	},
}

Debug dispatches debug subcommands.

View Source
var Main = simplcli.SimplCLI{
	SubCmds: map[string]simplcli.SubCmd{
		"debug":    {Debug.Run, "Debugging commands"},
		"download": {Download, "Download a tool"},
		"common":   {Common.Run, "Show available common tools"},
	},
}

Main dispatches CLI commands.

Functions

func CommonBootstrap

func CommonBootstrap(_ context.Context, _, stderr io.Writer, args []string) error

CommonBootstrap writes the boilerplate to ensure a common tool to Makefile.

func CommonDetail

func CommonDetail(_ context.Context, stdout, stderr io.Writer, args []string) error

CommonDetail writes the details of the given tools to stdout.

func CommonList

func CommonList(_ context.Context, stdout, _ io.Writer, _ []string) error

CommonList writes the list of known common tools to stdout.

func DebugTemplate

func DebugTemplate(_ context.Context, stdout, _ io.Writer, args []string) error

DebugTemplate renders text as a template and writes the result to out.

func DebugTemplateData

func DebugTemplateData(_ context.Context, stdout, _ io.Writer, _ []string) error

DebugTemplateData writes template data as JSON to out.

func Download

func Download(ctx context.Context, _, stderr io.Writer, args []string) error

Download fetches and extracts an executable from a URL.

When MINDL_UPDATE is set the hashes for all known OS/Arch combinations for this tool are updated in the sumdb.

If -common is passed hashes for common OS/Arch combinations are added as well if they are not set yet.

Types

This section is empty.

Jump to

Keyboard shortcuts

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