complex-type

command
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2020 License: MIT Imports: 3 Imported by: 0

README

= Complex Type Example
:source-highlighter: pygments
:pygments-style: monokai

CLI Example using the built in handling for complex types.

.Try With
[source, bash-session]
----
go run examples/complex-type/main.go \
  -s foo \
  -sbar \
  --string-slice=fizz \
  -i 0x33=false \
  -i0o77:true \
  --int-bool-map=28=yes \
  -bhello:goodbye \
  -b yes=no \
  --string-bytes=bytes=1234
----

.Expected Output
[source, json]
----
{
  "Strings": [
    "foo",
    "bar",
    "fizz"
  ],
  "IntToBool": {
    "28": true,
    "51": false,
    "63": true
  },
  "StringToBytes": {
    "bytes": "MTIzNA==",
    "hello": "Z29vZGJ5ZQ==",
    "yes": "bm8="
  }
}
----

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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