common

package
v0.0.0-...-2b76a8e Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 8 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetValidArgs

func GetValidArgs(variant CommandVariant) (longArgs []string, shortArgs []string, mapping map[string]MappingQuery)

func MakePizza

func MakePizza(contents string, args Arguments) uint16

func PrintLicense

func PrintLicense()

Types

type Arguments

type Arguments struct {
	Name           *string `dos:"n" posix:"name" posix_short:"n" powershell:"Name" powershell_short:"n"`
	Duration       *uint16 `dos:"d" posix:"duration" posix_short:"d" powershell:"Duration" powershell_short:"d"`
	Pineapple      *bool   `` /* 140-byte string literal not displayed */
	CheckSuperuser *bool   `` /* 157-byte string literal not displayed */
	ExitCode       *uint16 `dos:"e" posix:"exit-code" posix_short:"e" powershell:"ExitCode" powershell_short:"e"`
	Help           *bool   `dos:"?" posix:"help" posix_short:"h" powershell:"Help" powershell_short:"h"`
	Version        *bool   `dos:"v" posix:"version" posix_short:"v" powershell:"Version" powershell_short:"v"`
}

func ParseArguments

func ParseArguments(parsed map[string]string, mapping map[string]MappingQuery) Arguments

type CommandVariant

type CommandVariant int
const (
	Dos CommandVariant = iota
	Posix
	PowerShell
)

type MappingQuery

type MappingQuery struct {
	Long     bool
	Field    reflect.StructField
	Negative bool
}

Jump to

Keyboard shortcuts

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