Skip to content

Commit

Permalink
merge flag and glint modules for cleaner api
Browse files Browse the repository at this point in the history
  • Loading branch information
TanklesXL committed Mar 22, 2024
1 parent a92b45a commit 698bfc6
Show file tree
Hide file tree
Showing 9 changed files with 1,002 additions and 940 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ import glint/flag
// this function returns the builder for the caps flag
fn caps_flag() -> flag.Builder(Bool) {
fn caps_flag() -> flag.FlagBuilder(Bool) {
flag.bool()
|> flag.default(False)
|> flag.description("Capitalize the hello message")
Expand Down
4 changes: 2 additions & 2 deletions examples/hello/src/hello.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ pub const caps = "caps"

/// a boolean flag with default False to control message capitalization.
///
pub fn caps_flag() -> flag.Builder(Bool) {
pub fn caps_flag() -> flag.FlagBuilder(Bool) {
flag.bool()
|> flag.default(False)
|> flag.description("Capitalize the hello message")
Expand All @@ -67,7 +67,7 @@ pub const repeat = "repeat"
/// an int flag with default 1 to control how many times to repeat the message.
/// this flag is constrained to values greater than 0.
///
pub fn repeat_flag() -> flag.Builder(Int) {
pub fn repeat_flag() -> flag.FlagBuilder(Int) {
use n <- flag.constraint(
flag.int()
|> flag.default(1)
Expand Down
Loading

0 comments on commit 698bfc6

Please sign in to comment.