From 826f7c9ab7c9b734ef3ce19dce59bc5eabb111fd Mon Sep 17 00:00:00 2001 From: Amolith Date: Mon, 9 Sep 2024 11:18:22 -0600 Subject: [PATCH] Add info to README, improve help msg --- README.md | 22 ++++++++++++++++++++++ main.go | 4 ++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 732c69b8ebe4ec7e9590f6bb137067ba7ee8f310..d2e4862ad42cfc644d95e9f1f2f18927f7a57ddd 100644 --- a/README.md +++ b/README.md @@ -3,3 +3,25 @@ CLI password generator that uses the [NewBase60 character set]. [NewBase60 character set]: http://tantek.pbworks.com/w/page/19402946/NewBase60 + +## Installation + +``` shell +$ go install git.sr.ht/~amolith/eow@latest +``` + +## Usage + +```text +$ eow -h +Usage: eow [-h] + +-h prints this help message + +Arguments are positional, so length AND count +may be omitted OR count may be omitted. If +specifying count, length must also be +specified. When ommitted, length defaults to +20 and count defaults to 1. +``` + diff --git a/main.go b/main.go index d08ff6052c01f2b6e168b75e15d25219dc7c87d0..a39ee4e87a32732c73cab53915dcdcbb096b4cfa 100644 --- a/main.go +++ b/main.go @@ -68,9 +68,9 @@ func generate(length int) string { } func printHelp() { - fmt.Println(`Usage: eow + fmt.Println(`Usage: eow [-h] -Generates count passwords of length length. +-h prints this help message Arguments are positional, so length AND count may be omitted OR count may be omitted. If