argparse

package
v0.0.0-...-a8df003 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const EXAMPLE_CONFIG = `` /* 536-byte string literal not displayed */

Variables

View Source
var CLI struct {
	ConfigPath string `help:"Alternate config file"`

	Backup        BackupCMD        `cmd:"" help:"Backup your dotfiles!"`
	Config        ConfigCMD        `cmd:"" help:"Print the current config."`
	ExampleConfig ExampleConfigCMD `cmd:"" help:"Print the example config."`
}

Functions

func ParseArguments

func ParseArguments(version string) *kong.Context

Types

type BackupCMD

type BackupCMD struct {
	DryRun bool     `help:"Dry run the backup."`
	Ignore bool     `help:"Ignore these backup rules."`
	Rules  []string `arg:"" optional:"" help:"Rules to backup/ignore"`
}

func (*BackupCMD) Run

func (b *BackupCMD) Run(opts *Opts) error

type ConfigCMD

type ConfigCMD struct {
}

func (*ConfigCMD) Run

func (c *ConfigCMD) Run(opts *Opts) error

type ExampleConfigCMD

type ExampleConfigCMD struct {
}

func (*ExampleConfigCMD) Run

func (e *ExampleConfigCMD) Run(opts *Opts) error

type Opts

type Opts struct {
	ConfigPath string
}

Jump to

Keyboard shortcuts

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