mirror of
https://github.com/therootcompany/golib.git
synced 2026-03-02 23:57:59 +00:00
feat(cmd/tcpfwd): add description to version/help output
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
f9e06f131b
commit
0d356c0b26
@ -18,6 +18,7 @@ import (
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
name = "tcpfwd"
|
name = "tcpfwd"
|
||||||
|
description = "TCP port forwarder - bridge local ports to remote hosts"
|
||||||
licenseYear = "2025"
|
licenseYear = "2025"
|
||||||
licenseOwner = "AJ ONeal <aj@therootcompany.com> (https://therootcompany.com)"
|
licenseOwner = "AJ ONeal <aj@therootcompany.com> (https://therootcompany.com)"
|
||||||
licenseType = "CC0-1.0"
|
licenseType = "CC0-1.0"
|
||||||
@ -30,9 +31,10 @@ var (
|
|||||||
date = "0001-01-01"
|
date = "0001-01-01"
|
||||||
)
|
)
|
||||||
|
|
||||||
// printVersion displays the version, commit, and build date.
|
// printVersion displays the version, commit, build date, and description.
|
||||||
func printVersion(w io.Writer) {
|
func printVersion(w io.Writer) {
|
||||||
_, _ = fmt.Fprintf(w, "%s v%s %s (%s)\n", name, version, commit[:7], date)
|
_, _ = fmt.Fprintf(w, "%s v%s %s (%s)\n", name, version, commit[:7], date)
|
||||||
|
_, _ = fmt.Fprintf(w, "%s\n", description)
|
||||||
_, _ = fmt.Fprintf(w, "Copyright (C) %s %s\n", licenseYear, licenseOwner)
|
_, _ = fmt.Fprintf(w, "Copyright (C) %s %s\n", licenseYear, licenseOwner)
|
||||||
_, _ = fmt.Fprintf(w, "Licensed under %s\n", licenseType)
|
_, _ = fmt.Fprintf(w, "Licensed under %s\n", licenseType)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user