Skip to content

Commit

Permalink
remove golint errors (rs#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
kveselkov authored and rs committed Oct 4, 2019
1 parent 0659953 commit 33a4561
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion journald/journald.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func levelToJPrio(zLevel string) journal.Priority {

func (w journalWriter) Write(p []byte) (n int, err error) {
if !journal.Enabled() {
err = fmt.Errorf("Cannot connect to journalD!!")
err = fmt.Errorf("cannot connect to journalD")
return
}
var event map[string]interface{}
Expand Down
4 changes: 2 additions & 2 deletions log.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,9 +303,9 @@ func (l *Logger) Error() *Event {
func (l *Logger) Err(err error) *Event {
if err != nil {
return l.Error().Err(err)
} else {
return l.Info()
}

return l.Info()
}

// Fatal starts a new message with fatal level. The os.Exit(1) function
Expand Down
4 changes: 2 additions & 2 deletions log_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -696,9 +696,9 @@ func TestCallerMarshalFunc(t *testing.T) {
parts := strings.Split(file, "/")
if len(parts) > 1 {
return strings.Join(parts[len(parts)-2:], "/") + ":" + strconv.Itoa(line)
} else {
return file + ":" + strconv.Itoa(line)
}

return file + ":" + strconv.Itoa(line)
}
_, file, line, _ = runtime.Caller(0)
caller = CallerMarshalFunc(file, line+2)
Expand Down

0 comments on commit 33a4561

Please sign in to comment.