diff options
| author | demo <demo@antix1> | 2026-05-30 23:04:48 -0400 |
|---|---|---|
| committer | demo <demo@antix1> | 2026-05-30 23:04:48 -0400 |
| commit | 462ca98bd6751ab91a8967a99f98f9553c48e7fd (patch) | |
| tree | 2684ef2cfe15c62da04dd7e018ec9105b4cab429 /main.go | |
| parent | 4f7d3203e44fca492aadb075d03b8b90b99c66c8 (diff) | |
feat: upgrade hamlet and use newer stuff from theremaster
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -46,13 +46,15 @@ func main() { log.Fatalf("Invalid -depth argument: %d", *maxDepth) } - shortcodePresent := hamlet.New(*shortcode) - urlArgPresent := hamlet.New(*urlArg) - if hamlet.Iff(urlArgPresent, shortcodePresent).Assert() { + // Use hamlet to vet the validity of the given command-line + // argument configuration provided by the user. + shortcodePresent := hamlet.Present(*shortcode) + urlArgPresent := hamlet.Present(*urlArg) + if hamlet.Xor(urlArgPresent, shortcodePresent).Deny() { log.Fatal("Need exactly one of -url or -shortcode") } - if !hamlet.If(hamlet.New(*shortcodeFilename), shortcodePresent).Assert() { + if hamlet.If(hamlet.Present(*shortcodeFilename), shortcodePresent).Deny() { log.Fatal("-scfile implies use of -shortcode") } |
