Skip to content
Snippets Groups Projects
Verified Commit 549bb819 authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

feat new function ParseOsArgs

parent 12c64750
Branches
Tags
No related merge requests found
package xflags package xflags
import "os"
// ParseOsArgs parses the os.Args.
func (s *Settings[C]) ParseOsArgs() *Settings[C] {
return s.Parse(os.Args[1:])
}
// Parse parses the command line arguments and assigns the values to the settings. // Parse parses the command line arguments and assigns the values to the settings.
func (s *setting[C]) Parse(args []string) *setting[C] { func (s *setting[C]) Parse(args []string) *setting[C] {
if len(s.errors) > 0 { if len(s.errors) > 0 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment