arg

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

the arg package simplifies cli flags (arguments)

Example
package main

import (
	"fmt"
	"simonwaldherr.de/go/golibs/arg"
	"time"
)

func main() {
	arg.String("name", "default", "usage string", time.Second*5)
	arg.Parse()
	fmt.Println("\ninput:", arg.Get("name"))
}
Output:

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dump

func Dump() string

func Get

func Get(name string) interface{}

func Parse

func Parse()

func String

func String(name, defaultValue, usage string, timeout time.Duration)

func StringArg added in v0.11.0

func StringArg(name, defaultValue, usage string, timeout time.Duration)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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