Skip to content

--help should not panic & other argument-passing interrogations #9

@drzraf

Description

@drzraf
$ go version
go version go1.13.8 linux/amd64

$ cd ./go/bin/ && ./SystemdJournal2Gelf --help 
panic: usage: SystemdJournal2Gelf SERVER:12201 [JOURNALCTL PARAMETERS]

goroutine 1 [running]:
main.main()
	~/go/src/github.com/parse-nl/SystemdJournal2Gelf/SystemdJournal2Gelf.go:164 +0x64d


$ ./SystemdJournal2Gelf localhost:12201 -- --version
Failed to add match '--version': Invalid argument
# ^^ I would expect it to be passed to journald...


$ ./SystemdJournal2Gelf localhost:12201 --version
panic: could not parse journal output: invalid character 's' looking for beginning of value
# ^^ Why?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions