Skip to content

Commit 093f5b3

Browse files
author
Ryan Miville
committed
clean up docs
1 parent 5df980a commit 093f5b3

File tree

3 files changed

+136
-288
lines changed

3 files changed

+136
-288
lines changed

README.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ This program is in the [examples directory](https://github.com/ryanmiville/clad/
2424
```gleam
2525
import argv
2626
import clad
27+
import gleam/dynamic
2728
import gleam/io
2829
import gleam/list
2930
import gleam/string
@@ -41,13 +42,14 @@ fn greet(args: Args) {
4142
}
4243
4344
fn args_decoder() {
44-
use name <- clad.string(long_name: "name", short_name: "n")
45-
use count <- clad.int_with_default(
45+
use name <- clad.arg(long_name: "name", short_name: "n", of: dynamic.string)
46+
use count <- clad.arg_with_default(
4647
long_name: "count",
4748
short_name: "c",
49+
of: dynamic.int,
4850
default: 1,
4951
)
50-
use scream <- clad.bool(long_name: "scream", short_name: "s")
52+
use scream <- clad.toggle(long_name: "scream", short_name: "s")
5153
clad.decoded(Args(name:, count:, scream:))
5254
}
5355

gleam.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name = "clad"
2-
version = "0.1.3"
2+
version = "0.1.4"
33

44
# Fill out these fields if you intend to generate HTML documentation or publish
55
# your project to the Hex package manager.

0 commit comments

Comments
 (0)