libpod/events: refactor to eliminate unused code

Shuffle the code around to eliminate "unused" warnings when linting
with various GOOS and build tags.

The only change in functionality should be that now NewEventer
returns ErrNoJournaldLogging (rather than "unknown event logger type")
on freebsd when journald is requested.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin
2025-03-29 19:02:49 -07:00
parent 91113c46ef
commit 6b1033eaa0
9 changed files with 35 additions and 44 deletions

View File

@@ -1,10 +1,7 @@
//go:build !systemd
//go:build (linux && !systemd) || freebsd
package events
// DefaultEventerType is logfile when systemd is not present
const DefaultEventerType = LogFile
// newJournalDEventer always returns an error if libsystemd not found
func newJournalDEventer(options EventerOptions) (Eventer, error) {
return nil, ErrNoJournaldLogging