all repos — x @ 85abb8783e12060ad8cf23731aea9d1e1b008fb7

Experiments and stuff

use golangci-lint for formatting

Alan Pearce
commit

85abb8783e12060ad8cf23731aea9d1e1b008fb7

parent

aec4ad68c47c60d088dfe5958ec57084b5b0cf9f

3 files changed, 23 insertions(+), 3 deletions(-)

changed files
M .golangci.yaml.golangci.yaml
@@ -33,6 +33,18 @@ - third_party$
- builtin$ - examples$ formatters: + enable: + - gofumpt + - golines + - goimports + settings: + gofmt: + simplify: true + golines: + tab-len: 2 + goimports: + local-prefixes: + - alin.ovh/x exclusions: generated: lax paths:
M listenfd/listenfd.golistenfd/listenfd.go
@@ -6,9 +6,10 @@ "net"
"os" "strconv" - "alin.ovh/x/log" "github.com/Southclaws/fault" "github.com/Southclaws/fault/fmsg" + + "alin.ovh/x/log" ) const fdStart = 3
M log/log.golog/log.go
@@ -5,8 +5,8 @@ "os"
"github.com/Southclaws/fault" "github.com/Southclaws/fault/fmsg" - "github.com/sykesm/zap-logfmt" - "github.com/thessem/zap-prettyconsole" + zaplogfmt "github.com/sykesm/zap-logfmt" + prettyconsole "github.com/thessem/zap-prettyconsole" "go.uber.org/zap" "go.uber.org/zap/zapcore" "moul.io/zapfilter"
@@ -19,21 +19,27 @@
func (l Logger) DPanic(msg string, rest ...any) { l.logger.DPanicw(msg, rest...) } + func (l Logger) Debug(msg string, rest ...any) { l.logger.Debugw(msg, rest...) } + func (l Logger) Info(msg string, rest ...any) { l.logger.Infow(msg, rest...) } + func (l Logger) Warn(msg string, rest ...any) { l.logger.Warnw(msg, rest...) } + func (l Logger) Error(msg string, rest ...any) { l.logger.Errorw(msg, rest...) } + func (l Logger) Panic(msg string, rest ...any) { l.logger.Panicw(msg, rest...) } + func (l Logger) Fatal(msg string, rest ...any) { l.logger.Fatalw(msg, rest...) }
@@ -43,6 +49,7 @@ return &Logger{
logger: l.logger.Named(name), } } + func (l Logger) With(args ...any) *Logger { return &Logger{ logger: l.logger.With(args...),