mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
daemon/logger/journald: fix linting errors
daemon/logger/journald/read.go:128:3 comment on exported function `CErr` should be of the form `CErr ...` daemon/logger/journald/read.go:131:36: unnecessary conversion (unconvert) return C.GoString(C.strerror(C.int(-ret))) ^ daemon/logger/journald/read.go:380:2: S1023: redundant `return` statement (gosimple) return ^ Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
6b0ecacd92
commit
d43bcc8974
1 changed files with 2 additions and 3 deletions
|
@ -125,10 +125,10 @@ func (s *journald) Close() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// convert error code returned from a sd_journal_* function
|
||||
// CErr converts error code returned from a sd_journal_* function
|
||||
// (which returns -errno) to a string
|
||||
func CErr(ret C.int) string {
|
||||
return C.GoString(C.strerror(C.int(-ret)))
|
||||
return C.GoString(C.strerror(-ret))
|
||||
}
|
||||
|
||||
func (s *journald) drainJournal(logWatcher *logger.LogWatcher, j *C.sd_journal, oldCursor *C.char, untilUnixMicro uint64) (*C.char, bool, int) {
|
||||
|
@ -377,7 +377,6 @@ func (s *journald) readLogs(logWatcher *logger.LogWatcher, config logger.ReadCon
|
|||
}
|
||||
|
||||
C.free(unsafe.Pointer(cursor))
|
||||
return
|
||||
}
|
||||
|
||||
func (s *journald) ReadLogs(config logger.ReadConfig) *logger.LogWatcher {
|
||||
|
|
Loading…
Reference in a new issue