maputil

package
v1.7.6 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MapBoolValueAsOpt

func MapBoolValueAsOpt(m map[string]string, key string) (bool, error)

MapBoolValueAsOpt will parse key as a command-line option. If only key is specified will be treated as true, otherwise, the value will be parsed and returned. This is useful when command line flags have options. Following examples illustrate this: --security-opt xxx returns true --security-opt xxx=true returns true --security-opt xxx=false returns false --security-opt xxx=invalid returns false and error

Types

This section is empty.

Jump to

Keyboard shortcuts

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