Registry / cli / pborman-getopt

pborman-getopt

JSON →
library1.1.0gogounverified

Package getopt provides traditional getopt and getopt_long processing for Go, supporting short and long flags, values, and multiple option sets.

go get github.com/pborman/getopt
INSTALL
IMPORT
SIG · PBORMAN-GETOPT
P
pborman-getopt
cligov1.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

getopt
github.com/pborman/getopt

Parse command-line flags using getopt-style options.

package main import ( "fmt" "github.com/pborman/getopt" ) func main() { name := getopt.StringLong("name", 'n', "", "your name") getopt.Parse() fmt.Printf("Hello, %s!\n", *name) }
Debug
Known issues
gotchaVersion 1 is legacy; v2 is available with the same package name but different import path.
fix
Use github.com/pborman/getopt/v2 for the latest version.
affects: >=1.0.0 <2.0.0
Upgrade
Version history
1.1.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
14 hits · last 30 days
node
12
Amazon
1
OpenAI (training)
1
Resources
pborman-getopt — go get pborman-getopt · libregistry