golangci-lint: add systemd build tag

Lint the systemd code and fix the reported problems.
The remoteclient tag is no longer used so I just removed it.

[NO NEW TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger
2022-06-13 13:36:20 +02:00
parent 9fac1b335f
commit 1b62e45438
3 changed files with 7 additions and 8 deletions

View File

@ -292,11 +292,12 @@ func formatterPrefix(entry *sdjournal.JournalEntry) (string, error) {
if !ok {
return "", errors.Errorf("no PRIORITY field present in journal entry")
}
if priority == journaldLogOut {
switch priority {
case journaldLogOut:
output += "stdout "
} else if priority == journaldLogErr {
case journaldLogErr:
output += "stderr "
} else {
default:
return "", errors.Errorf("unexpected PRIORITY field in journal entry")
}