program

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = "unknown"

Functions

This section is empty.

Types

type Brew

type Brew struct {
	Version     string   `help:"Version of this release"`
	Description string   `help:"Brew description"`
	ConfigFile  string   `short:"f" type:"existingfile" help:"config file from which to read recipe config"`
	Repo        []string `arg:"" optional:"" help:"Github owner/repo"`
}

func (*Brew) AfterApply

func (b *Brew) AfterApply() error

func (*Brew) HandleRecipe

func (b *Brew) HandleRecipe(r *homebrew.Recipe) (bool, error)

func (*Brew) Run

func (b *Brew) Run(options *Options) error

type ConfigFile

type ConfigFile struct {
	// Owner is the default owner for all repos, if an owner is not specified
	Owner   string             `json:"owner"`
	Recipes []*homebrew.Recipe `json:"recipes"`
	// Docs is the list of documents to update with the recipes
	Docs []UpdateDoc `json:"docs"`
	// Tap should be the prefix for this tap
	Tap string `json:"tap"`
}

func NewConfigFile

func NewConfigFile(b *Brew) (*ConfigFile, error)

type Options

type Options struct {
	//Version bool `help:"Show program version"`
	VersionCmd VersionCmd `name:"version" cmd:"" help:"show program version"`

	Brew Brew `cmd:"" help:"Create brew release files for a golang program in GitHub"`

	Debug        bool   `group:"Info" help:"Show debugging information"`
	OutputFormat string `group:"Info" enum:"auto,jsonl,terminal" default:"auto" help:"How to show program output (auto|terminal|jsonl)"`
	Quiet        bool   `group:"Info" help:"Be less verbose than usual"`
	DontUseToken bool   `` /* 172-byte string literal not displayed */
}

Options is the structure of program options

func (*Options) AfterApply

func (program *Options) AfterApply() error

AfterApply runs after the options are parsed but before anything runs

func (*Options) Parse

func (program *Options) Parse(args []string) (*kong.Context, error)

Parse calls the CLI parsing routines

func (*Options) Run

func (program *Options) Run(options *Options) error

Run runs the program

type UpdateDoc

type UpdateDoc struct {
	// File is the name of the file to update
	File string `json:"file"`
	// Section is the name of the section to replace
	Section string `json:"section"`
}

func (*UpdateDoc) Update

func (u *UpdateDoc) Update(configfile *ConfigFile, recipes []*homebrew.Recipe) error

type VersionCmd

type VersionCmd struct{}

VersionCmd prints the program version

func (*VersionCmd) Run

func (v *VersionCmd) Run(program *Options) error

Jump to

Keyboard shortcuts

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