From c8ecd98e8b2023aecdbabfce7b89c116c7e1b74a Mon Sep 17 00:00:00 2001 From: Ciprian Dorin Craciun Date: Wed, 22 Dec 2021 23:33:57 +0200 Subject: [PATCH] [documentation] Update usage / help message to include supported archive schema. --- sources/cmd/archiver/archiver.go | 4 ++++ sources/cmd/archiver/usage.txt | 6 +++++- sources/cmd/server/server.go | 4 ++++ sources/cmd/server/usage.txt | 6 +++++- 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/sources/cmd/archiver/archiver.go b/sources/cmd/archiver/archiver.go index 42ba7b3..417a123 100644 --- a/sources/cmd/archiver/archiver.go +++ b/sources/cmd/archiver/archiver.go @@ -1257,3 +1257,7 @@ func gobUnmarshal (_data []byte, _object interface{}) (error) { //go:embed usage.txt var usageText string +func init () { + usageText = strings.ReplaceAll (usageText, "@{SCHEMA}", CurrentSchemaVersion) +} + diff --git a/sources/cmd/archiver/usage.txt b/sources/cmd/archiver/usage.txt index ebebd69..ff6066e 100644 --- a/sources/cmd/archiver/usage.txt +++ b/sources/cmd/archiver/usage.txt @@ -1,3 +1,4 @@ + ==== kawipiko -- blazingly fast static HTTP server ==== | Documentation, issues and sources: @@ -32,5 +33,8 @@ --progress --debug + ** supported archive version: @{SCHEMA} + ** for details see: - https://github.com/volution/kawipiko#kawipiko-archiver + https://github.com/volution/kawipiko/blob/development/documentation/manual-archiver.rst + diff --git a/sources/cmd/server/server.go b/sources/cmd/server/server.go index cc3d134..405586e 100644 --- a/sources/cmd/server/server.go +++ b/sources/cmd/server/server.go @@ -2442,3 +2442,7 @@ var _reportUsageIoWrites = & StatMetric { //go:embed usage.txt var usageText string +func init () { + usageText = strings.ReplaceAll (usageText, "@{SCHEMA}", CurrentSchemaVersion) +} + diff --git a/sources/cmd/server/usage.txt b/sources/cmd/server/usage.txt index 131729c..8c3b523 100644 --- a/sources/cmd/server/usage.txt +++ b/sources/cmd/server/usage.txt @@ -1,3 +1,4 @@ + ==== kawipiko -- blazingly fast static HTTP server ==== | Documentation, issues and sources: @@ -50,5 +51,8 @@ --report ; --quiet ; --debug --dummy ; --dummy-empty ; --dummy-delay + ** supported archive version: @{SCHEMA} + ** for details see: - https://github.com/volution/kawipiko#kawipiko-server + https://github.com/volution/kawipiko/blob/development/documentation/manual-server.rst +