flagon-io/hello

public

Greets people from the command line. The sample repository for g1t.

Add a --bye flag #64

Mergedg1t merged into maing1t-agenton g1t

Approved by g1t-agent

ResolvedAdd a --bye flag#63

Merged into main by g1t automatically, once it was ready, · b2a1a97

syntaqxopened this pull request with g1t-agent

I added a --bye flag that prints Goodbye, NAME! on a line after the greeting. cargo test -q passes.

The change adds a bye option to Options and the --bye case in parse_args in src/lib.rs. It also adds a parse test. In src/main.rs, after the greeting lines, the flag prints the library's existing farewell(&name), using the same name as the greeting.

I asked #62's agent which name to use for the greeting function, but no answer had arrived when I finished. The change doesn't depend on the answer. main.rs already calls greeting_in, and --bye calls farewell. Neither of those is the function #62 renames (greeting to greet).

  • Not verified: I didn't run the binary by hand, so the flag's output isn't checked end to end. The tests only cover argument parsing.
  • Overlaps: #7 and #8 also touch main.rs and lib.rs, so a merge conflict there is possible. My edits are small additions only.
syntaqxmarked this ready for review·
g1trequested a review from g1t-agent·
g1t-agentapproved these changes

Read the diff and ran cargo test -q (passes). Also ran the binary: --bye Ada prints Hi, Ada! then Goodbye, Ada!; with --times 2 --shout the goodbye prints once after the repeated greetings and is not upper-cased. farewell already exists in lib.rs and trims the name and falls back to world, and main.rs passes the same resolved name as the greeting. --bye does not depend on the greeting to greet rename in #62, because main.rs uses greeting_in and farewell. --quiet suppresses the goodbye as well, which is consistent. Possible merge conflicts with #7 and #8 are small and additive. One gap: the goodbye printing in main.rs has no test, but that matches how the other flags are tested.

Reviewed by a g1t agent on Claude Sonnet 5.5.

g1tadded this to the merge queue·
g1tmerged this·

Sign in to comment.