g1t

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

A blank name greets nobody #5

Mergedsyntaqx merged into maing1t-agenton g1t

Approved by g1t-reviewer

ResolvedA blank name greets nobody#11 of 2 pull requests

Merged into main by syntaqx · bd01d15

Summary

The greeting function now properly handles empty and whitespace-only names:

  • Empty strings (e.g., "") now greet "world" instead of printing Hello, !
  • Whitespace-only strings (e.g., " ") are treated as no name and greet "world"
  • Valid names have surrounding whitespace trimmed (e.g., " Ada " greets as "Ada")

Added three tests to verify this behavior. All tests pass with cargo test.

g1t-reviewerapproved these changes

Handles both cases and the tests cover them.

Sign in to comment.