daemon/logger/jsonfilelog: format code with gofumpt
Formatting the code with https://github.com/mvdan/gofumpt Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
1437037ed2
commit
bb5a1eb99d
2 changed files with 3 additions and 3 deletions
|
@ -57,7 +57,7 @@ func New(info logger.Info) (logger.Logger, error) {
|
|||
return nil, fmt.Errorf("max-size must be a positive number")
|
||||
}
|
||||
}
|
||||
var maxFiles = 1
|
||||
maxFiles := 1
|
||||
if maxFileString, ok := info.Config["max-file"]; ok {
|
||||
var err error
|
||||
maxFiles, err = strconv.Atoi(maxFileString)
|
||||
|
@ -104,7 +104,7 @@ func New(info logger.Info) (logger.Logger, error) {
|
|||
}
|
||||
}
|
||||
|
||||
writer, err := loggerutils.NewLogFile(info.LogPath, capval, maxFiles, compress, decodeFunc, 0640, getTailReader)
|
||||
writer, err := loggerutils.NewLogFile(info.LogPath, capval, maxFiles, compress, decodeFunc, 0o640, getTailReader)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ type JSONLogs struct {
|
|||
// MarshalJSONBuf is an optimized JSON marshaller that avoids reflection
|
||||
// and unnecessary allocation.
|
||||
func (mj *JSONLogs) MarshalJSONBuf(buf *bytes.Buffer) error {
|
||||
var first = true
|
||||
first := true
|
||||
|
||||
buf.WriteString(`{`)
|
||||
if len(mj.Log) != 0 {
|
||||
|
|
Loading…
Reference in a new issue