@@ -62,9 +62,9 @@ type JournalReader struct {
6262// NewJournalReader creates a new JournalReader with configuration options that are similar to the
6363// systemd journalctl tool's iteration and filtering features.
6464func NewJournalReader (config JournalReaderConfig ) (* JournalReader , error ) {
65- // use simpelMessageFormatter as default formatter.
65+ // use simpleMessageFormatter as default formatter.
6666 if config .Formatter == nil {
67- config .Formatter = simpelMessageFormatter
67+ config .Formatter = simpleMessageFormatter
6868 }
6969
7070 r := & JournalReader {
@@ -256,17 +256,16 @@ process:
256256 return
257257}
258258
259- // simpelMessageFormatter is the default formatter.
259+ // simpleMessageFormatter is the default formatter.
260260// It returns a string representing the current journal entry in a simple format which
261261// includes the entry timestamp and MESSAGE field.
262- func simpelMessageFormatter (entry * JournalEntry ) (string , error ) {
262+ func simpleMessageFormatter (entry * JournalEntry ) (string , error ) {
263263 msg , ok := entry .Fields ["MESSAGE" ]
264-
265264 if ! ok {
266265 return "" , fmt .Errorf ("no MESSAGE field present in journal entry" )
267266 }
268- usec := entry .RealtimeTimestamp
269267
268+ usec := entry .RealtimeTimestamp
270269 timestamp := time .Unix (0 , int64 (usec )* int64 (time .Microsecond ))
271270
272271 return fmt .Sprintf ("%s %s\n " , timestamp , msg ), nil
0 commit comments