Compare commits
6 Commits
e801a48c7c
...
v0.6.1
Author | SHA1 | Date | |
---|---|---|---|
a1892cbe37 | |||
9b849fad3a | |||
e9c7c7b744 | |||
74ad307bd1 | |||
d1aedbb521 | |||
2a101d89d0 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
./20211228134923.20211228151348
|
./20211228134923.20211228151348
|
||||||
tmpwrk
|
tmpwrk
|
||||||
|
godit
|
||||||
|
14
main.go
14
main.go
@ -33,7 +33,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
version = "5.9.9c"
|
version = "0.6.1"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -51,11 +51,11 @@ func main() {
|
|||||||
var syslog23 bool
|
var syslog23 bool
|
||||||
var json bool
|
var json bool
|
||||||
|
|
||||||
pflag.BoolVarP(&oneLine, "oneline", "l", false, "Prints the entire record on the same line.")
|
pflag.BoolVarP(&oneLine, "oneline", "l", false, "Prints the entire record on the same line")
|
||||||
pflag.BoolVarP(&noUserResolve, "numeric", "n", false, "Do not convert user and group IDs to their names but leave in their numeric forms.")
|
pflag.BoolVarP(&noUserResolve, "numeric", "n", false, "Do not convert user and group IDs to their names but leave in their numeric forms")
|
||||||
pflag.BoolVarP(&json, "json", "j", false, "Print compact json")
|
pflag.BoolVarP(&json, "json", "j", false, "Print compact json")
|
||||||
pflag.BoolVarP(&syslog23, "syslog23", "s", false, "Print time as \"2006-01-02T15:04:05.000Z07:00\", RFC339 with ms, also used on RSYSLOG_SyslogProtocol23Format. \"msec\" field will not be print in json output.")
|
pflag.BoolVarP(&syslog23, "syslog23", "s", false, "Print time as \"2006-01-02T15:04:05.000Z07:00\", RFC339 with ms, also used on RSYSLOG_SyslogProtocol23Format. \"msec\" field will not be print in json output")
|
||||||
pflag.BoolVarP(&showVersion, "version", "V", false, "Show version then exit")
|
pflag.BoolVarP(&showVersion, "version", "V", false, "Show version and exit")
|
||||||
|
|
||||||
var Usage = func() {
|
var Usage = func() {
|
||||||
fmt.Fprintf(os.Stderr, "Usage of \"%s [opts] auditfile\":\n", os.Args[0])
|
fmt.Fprintf(os.Stderr, "Usage of \"%s [opts] auditfile\":\n", os.Args[0])
|
||||||
@ -84,6 +84,10 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
args := os.Args
|
args := os.Args
|
||||||
|
if len(os.Args) < 2 {
|
||||||
|
pflag.Usage()
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
filename := args[len(args)-1]
|
filename := args[len(args)-1]
|
||||||
|
|
||||||
var f *os.File
|
var f *os.File
|
||||||
|
Reference in New Issue
Block a user