diff --git a/sources/cmd/archiver/archiver.go b/sources/cmd/archiver/archiver.go index 35d03ff..d068052 100644 --- a/sources/cmd/archiver/archiver.go +++ b/sources/cmd/archiver/archiver.go @@ -27,6 +27,8 @@ import "go.etcd.io/bbolt" import . "github.com/volution/kawipiko/lib/common" import . "github.com/volution/kawipiko/lib/archiver" +import _ "embed" + @@ -958,44 +960,7 @@ func main_0 () (error) { _flags := flag.NewFlagSet ("kawipiko-archiver", flag.ContinueOnError) _flags.Usage = func () () { - fmt.Fprintf (os.Stderr, "%s", -` - ==== kawipiko -- blazingly fast static HTTP server ==== - - | Documentation, issues and sources: - | * https://github.com/volution/kawipiko - | Authors: - | * Ciprian Dorin Craciun - | ciprian@volution.ro - | ciprian.craciun@gmail.com - | https://volution.ro/ciprian - ----------------------------------------------------------- - - kawipiko-archiver - - --sources - - --archive - - --compress - --compress-level - --compress-cache - - --exclude-index - --exclude-strip - --exclude-cache - --include-etag - - --exclude-file-listing - --include-folder-listing - - --progress - --debug - - ** for details see: - https://github.com/volution/kawipiko#kawipiko-archiver - -`) + fmt.Fprintf (os.Stderr, "%s", usageText) } _sourcesFolder_0 := _flags.String ("sources", "", "") @@ -1174,3 +1139,9 @@ func main_0 () (error) { return nil } + + + +//go:embed usage.txt +var usageText string + diff --git a/sources/cmd/archiver/usage.txt b/sources/cmd/archiver/usage.txt new file mode 100644 index 0000000..9950727 --- /dev/null +++ b/sources/cmd/archiver/usage.txt @@ -0,0 +1,34 @@ + ==== kawipiko -- blazingly fast static HTTP server ==== + + | Documentation, issues and sources: + | * https://github.com/volution/kawipiko + | Authors: + | * Ciprian Dorin Craciun + | ciprian@volution.ro + | ciprian.craciun@gmail.com + | https://volution.ro/ciprian + ----------------------------------------------------------- + + kawipiko-archiver + + --sources + + --archive + + --compress + --compress-level + --compress-cache + + --exclude-index + --exclude-strip + --exclude-cache + --include-etag + + --exclude-file-listing + --include-folder-listing + + --progress + --debug + + ** for details see: + https://github.com/volution/kawipiko#kawipiko-archiver diff --git a/sources/cmd/server/server.go b/sources/cmd/server/server.go index ad4c968..e1e66a7 100644 --- a/sources/cmd/server/server.go +++ b/sources/cmd/server/server.go @@ -33,6 +33,8 @@ import "github.com/valyala/fasthttp/reuseport" import . "github.com/volution/kawipiko/lib/common" import . "github.com/volution/kawipiko/lib/server" +import _ "embed" + @@ -484,57 +486,7 @@ func main_0 () (error) { _flags := flag.NewFlagSet ("kawipiko-server", flag.ContinueOnError) _flags.Usage = func () () { - fmt.Fprintf (os.Stderr, "%s", -` - ==== kawipiko -- blazingly fast static HTTP server ==== - - | Documentation, issues and sources: - | * https://github.com/volution/kawipiko - | Authors: - | * Ciprian Dorin Craciun - | ciprian@volution.ro - | ciprian.craciun@gmail.com - | https://volution.ro/ciprian - ----------------------------------------------------------- - - kawipiko-server - - --archive - --archive-inmem (memory-loaded archive file) - --archive-mmap (memory-mapped archive file) - --archive-preload (preload archive in OS cache) - - --bind : (HTTP, only HTTP/1.1) - --bind-tls : (HTTPS, only HTTP/1.1) - --bind-tls-2 : (HTTPS, with HTTP/2) - - --tls-bundle (TLS certificate bundle) - --tls-public (TLS certificate public) - --tls-private (TLS certificate private) - - --processes (of slave processes) - --threads (of threads per process) - - --index-all - --index-paths - --index-data-meta - --index-data-content - - --security-headers-tls - --security-headers-disable - --timeout-disable - - --profile-cpu - --profile-mem - - --debug - --dummy - --delay - - ** for details see: - https://github.com/volution/kawipiko#kawipiko-server - -`) + fmt.Fprintf (os.Stderr, "%s", usageText) } _bind_0 := _flags.String ("bind", "", "") @@ -1493,3 +1445,9 @@ func (_listener *splitListener) Addr () (net.Addr) { } } + + + +//go:embed usage.txt +var usageText string + diff --git a/sources/cmd/server/usage.txt b/sources/cmd/server/usage.txt new file mode 100644 index 0000000..4a7a7f6 --- /dev/null +++ b/sources/cmd/server/usage.txt @@ -0,0 +1,47 @@ + ==== kawipiko -- blazingly fast static HTTP server ==== + + | Documentation, issues and sources: + | * https://github.com/volution/kawipiko + | Authors: + | * Ciprian Dorin Craciun + | ciprian@volution.ro + | ciprian.craciun@gmail.com + | https://volution.ro/ciprian + ----------------------------------------------------------- + + kawipiko-server + + --archive + --archive-inmem (memory-loaded archive file) + --archive-mmap (memory-mapped archive file) + --archive-preload (preload archive in OS cache) + + --bind : (HTTP, only HTTP/1.1) + --bind-tls : (HTTPS, only HTTP/1.1) + --bind-tls-2 : (HTTPS, with HTTP/2) + + --tls-bundle (TLS certificate bundle) + --tls-public (TLS certificate public) + --tls-private (TLS certificate private) + + --processes (of slave processes) + --threads (of threads per process) + + --index-all + --index-paths + --index-data-meta + --index-data-content + + --security-headers-tls + --security-headers-disable + --timeout-disable + + --profile-cpu + --profile-mem + + --debug + --dummy + --delay + + ** for details see: + https://github.com/volution/kawipiko#kawipiko-server