From b22864013d2873e02fd1dee0edbc7542c008b807 Mon Sep 17 00:00:00 2001 From: Michael Senn Date: Fri, 7 Aug 2020 23:00:17 +0200 Subject: [PATCH] Fix documentation of `workwebui`. Example URI was not a valid URI according to Redis' URI specification. This commit fixes the example both in the readme, as well as the binaries' helptext. --- README.md | 6 +++++- cmd/workwebui/main.go | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9c257811..9a6b940d 100644 --- a/README.md +++ b/README.md @@ -251,9 +251,13 @@ go install github.com/gocraft/work/cmd/workwebui Then, you can run it: ```bash -workwebui -redis="redis:6379" -ns="work" -listen=":5040" +workwebui -redis="redis://127.0.0.1:6379" -ns="work" -listen=":5040" ``` +For the `-redis` parameter, any Redis URI conforming to the +[specification](https://www.iana.org/assignments/uri-schemes/prov/redis) is +allowed - see its ABNF notation or example section for further details. + Navigate to ```http://localhost:5040/```. You'll see a view that looks like this: diff --git a/cmd/workwebui/main.go b/cmd/workwebui/main.go index 6d3e32fc..420755ac 100644 --- a/cmd/workwebui/main.go +++ b/cmd/workwebui/main.go @@ -13,7 +13,7 @@ import ( ) var ( - redisHostPort = flag.String("redis", ":6379", "redis hostport") + redisHostPort = flag.String("redis", "redis://:6379", "redis URI") redisDatabase = flag.String("database", "0", "redis database") redisNamespace = flag.String("ns", "work", "redis namespace") webHostPort = flag.String("listen", ":5040", "hostport to listen for HTTP JSON API")