Files
nix/hosts/elara/users/nikara/configs/console/klog/remove-version-flag.patch
Nikolaos Karaolidis 79ff5a55e2 Add more sas tooling
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
2025-01-09 16:30:02 +00:00

34 lines
1.2 KiB
Diff

diff --git a/main.go b/main.go
index 6fee5d3..a8d45dd 100644
--- a/main.go
+++ b/main.go
@@ -5,7 +5,6 @@ import (
"flag"
"fmt"
"os"
- "runtime"
"strings"
"time"
@@ -27,20 +26,8 @@ func main() {
flag.StringVar(&f, "format", "term", "Log output format (one of json|pretty|yaml|line|file|term|logfmt|plain|message|template)")
flag.StringVar(&ml, "l", "trace", "Minimum log level to output (in order, one of trace|debug|info|warn|error|fatal|panic|none|disabled)")
flag.StringVar(&tz, "t", defaultTimeZone, "Timezone to use for formatting log timestamps - One of UTC, Local, or from https://en.wikipedia.org/wiki/List_of_tz_database_time_zones")
- var ver bool
- flag.BoolVar(&ver, "version", false, "Show version information")
flag.Parse()
- if ver {
- fmt.Printf("Copyright © 2021, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\n"+
- "Command - %s\n"+
- "Version - %s+%s\n"+
- "Build Date - %s\n"+
- "Compiler - %s %s/%s\n",
- "klog", BuildVersion, BuildCommit, BuildDate, runtime.Version(), runtime.GOOS, runtime.GOARCH)
- os.Exit(0)
- }
-
lf, ok := log.Formatters[f]
if !ok {
fmt.Fprintf(os.Stderr, "invalid value for format: [%s] - must be one of json|pretty|yaml|line|file|term|logfmt|plain|message|template", f)