remove golint errors (#187)

This commit is contained in:
Veselkov Konstantin 2019-10-04 18:31:06 +04:00 committed by Olivier Poitrey
parent 06599535fa
commit 33a4561a07
3 changed files with 5 additions and 5 deletions

View File

@ -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{}

4
log.go
View File

@ -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

View File

@ -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)