flags

package
v0.0.0-...-f9e32f2 Latest Latest
Warning

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

Go to latest
Published: May 7, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package flags handles flag parsing

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse() map[string]interface{}

Parse converts command line arguments into an interface. Argument can have any number of leading dashes and be separated from their value by an equal sign or white space. Equal signs must not be present anywhere other than between the argument and its value.

func SetFloat

func SetFloat(field string, args, fileOptions map[string]interface{}, defaultValue float64) float64

SetFloat sets the field value from a command line argument, then from the fileOptions map if no argument is defined and finally to the defaultValue.

func SetInt

func SetInt(field string, args, fileOptions map[string]interface{}, defaultValue int) int

SetInt sets the field value from a command line argument, then from the fileOptions map if no argument is defined and finally to the defaultValue.

func SetString

func SetString(field string, args, fileOptions map[string]interface{}, defaultValue string) string

SetString sets the field value from a command line argument, then from the fileOptions map if no argument is defined and finally to the defaultValue.

Types

This section is empty.

Jump to

Keyboard shortcuts

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