xflag – github.com/mfridman/xflag Index | Files

package xflag

import "github.com/mfridman/xflag"

Index

Functions

func ParseToEnd

func ParseToEnd(f *flag.FlagSet, arguments []string) error

ParseToEnd is a drop-in replacement for flag.Parse. It improves upon the standard behavior by parsing flags even when they are interspersed with positional arguments. This overcomes Go's default limitation of stopping flag parsing upon encountering the first positional argument. For more details, see:

This is a bit unforunate, but most users nowadays consuming CLI tools expect this behavior.

Source Files

parse.go

Version
v0.1.0 (latest)
Published
Aug 25, 2024
Platform
js/wasm
Imports
3 packages
Last checked
now

Tools for package owners.