Add more sas tooling
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
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)
|
Reference in New Issue
Block a user