parse

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Value added in v0.4.3

func Value(content string) (interface{}, error)

Value parses command line arguments, supporting boolean, numbers, strings, arrays, objects.

The parser implements a superset of JSON, but only a subset of YAML by allowing for arrays and objects having a trailing comma. In addition 3 strings types are supported:

  1. single quoted string (no unescaping of any characters)
  2. double quoted strings (characters are escaped)
  3. strings without quotes. String parsing stops in special characters like '[]{},:'

In addition, top-level values can be separated by ',' to build arrays without having to use [].

Types

This section is empty.

Jump to

Keyboard shortcuts

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