Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
dezren39 committed Oct 31, 2023
1 parent d4bdd2a commit 4a1dfd9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions text.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,11 @@ func needsQuoting(str string) bool {

func (l *Logger) textFormatter(keyvals ...interface{}) {
lenKeyvals := len(keyvals)
firstElementOfLastKeyvalPair := lenKeyvals - 2

for i := 0; i < lenKeyvals; i += 2 {
firstKey := i == 0
moreKeys := i < firstElementOfLastKeyvalPair
moreKeys := i < lenKeyvals-2

switch keyvals[i] {
case TimestampKey:
if t, ok := keyvals[i+1].(time.Time); ok {
Expand Down

0 comments on commit 4a1dfd9

Please sign in to comment.