cli

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FlagPkgName    = "name"
	FlagPkgArch    = "arch"
	FlagPkgVersion = "version"

	FlagOutDirectory = "directory"
	FlagOutFilename  = "file"
	FlagOutApk       = "apk"
	FlagOutDeb       = "deb"
	FlagOutRpm       = "rpm"
	FlagInstall      = "install"
)

Variables

View Source
var GenerateFlags = []cli.Flag{
	&cli.StringFlag{Name: FlagPkgName, Usage: "package name", Category: "Parameters"},
	&cli.StringFlag{Name: FlagPkgArch, Usage: "package architecture", Category: "Parameters"},
	&cli.StringFlag{Name: FlagPkgVersion, Usage: "package version", Category: "Parameters"},
	&cli.StringFlag{Name: pkgMaintainer, Usage: "package maintainer", Category: "Parameters"},
	&cli.StringFlag{
		Name:     pkgDescription,
		Usage:    "package description",
		Value:    "hansel virtual package",
		Category: "Parameters",
	},

	&cli.StringFlag{Name: FlagOutDirectory, Usage: "output directory", Value: ".", Category: "Output"},
	&cli.StringFlag{Name: FlagOutFilename, Usage: "output filename, generated if not provided", Category: "Output"},

	&cli.BoolFlag{Name: FlagOutApk, Usage: "generate apk package", Aliases: []string{"alpine"}, Category: "Packages"},
	&cli.BoolFlag{
		Name:     FlagOutDeb,
		Usage:    "generate deb package",
		Aliases:  []string{"debian", "ubuntu"},
		Category: "Packages",
	},
	&cli.BoolFlag{
		Name:     FlagOutRpm,
		Usage:    "generate rpm package",
		Aliases:  []string{"fedora", "rhel"},
		Category: "Packages",
	},
	&cli.BoolFlag{
		Name:     FlagInstall,
		Usage:    "install the package automatically and delete the file",
		Category: "Packages",
	},
}

Functions

func Generate

func Generate(log *slog.Logger) func(ctx *cli.Context) error

func NewApp

func NewApp(log *slog.Logger) *cli.App

Types

This section is empty.

Jump to

Keyboard shortcuts

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