From 5b7f4e63cc1447b41506d9dbdcb2dfc18b281e10 Mon Sep 17 00:00:00 2001 From: andrey Date: Mon, 2 Mar 2026 17:50:10 +0300 Subject: [PATCH] update typo --- field/encoder.go | 2 +- field/encoder_text.go | 2 +- field/errors.go | 2 +- field/field.go | 2 +- global.go | 4 ++-- handler/logrus/logger.go | 2 +- logger.go | 4 ++-- writter.go => writer.go | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) rename writter.go => writer.go (99%) diff --git a/field/encoder.go b/field/encoder.go index 968705a..34dfa1d 100644 --- a/field/encoder.go +++ b/field/encoder.go @@ -31,7 +31,7 @@ func WithDelimeter(in byte) func(*BaseEncoder) { } } -func WithGropuConfig(start, end, deli byte) func(*BaseEncoder) { +func WithGroupConfig(start, end, deli byte) func(*BaseEncoder) { return func(be *BaseEncoder) { be.group = groupConfig{ start: start, diff --git a/field/encoder_text.go b/field/encoder_text.go index e3be369..9db54b8 100644 --- a/field/encoder_text.go +++ b/field/encoder_text.go @@ -7,7 +7,7 @@ import ( func NewEncoderText(opts ...func(*BaseEncoder)) BaseEncoder { opts = append([]func(*BaseEncoder){ - WithGropuConfig(0, 0, ' '), + WithGroupConfig(0, 0, ' '), WithNullValue(""), WithDefaultValue(func(dst []byte, enc Encoder, val Value) []byte { switch value := val.Any().(type) { diff --git a/field/errors.go b/field/errors.go index a00ddde..bd30737 100644 --- a/field/errors.go +++ b/field/errors.go @@ -2,4 +2,4 @@ package field import "errors" -var ErrUndefined = errors.New("indefined") +var ErrUndefined = errors.New("undefined") diff --git a/field/field.go b/field/field.go index 032348a..33ddeac 100644 --- a/field/field.go +++ b/field/field.go @@ -505,7 +505,7 @@ type Field struct { Value Value } -// String implent stringer. +// String implement stringer. func (f Field) String() string { return fmt.Sprintf("%s=%+v", f.Key, f.Value) } diff --git a/global.go b/global.go index 20fd171..f196e49 100644 --- a/global.go +++ b/global.go @@ -107,7 +107,7 @@ func AlertKVs(ctx context.Context, msg string, args ...any) { global.AlertKVs(ctx, msg, args...) } -// CritKVs sugared log by critcal level and key-values. +// CritKVs sugared log by critical level and key-values. func CritKVs(ctx context.Context, msg string, args ...any) { global.CritKVs(ctx, msg, args...) } @@ -147,7 +147,7 @@ func AlertKV(ctx context.Context, msg string, args ...field.Field) { global.AlertKV(ctx, msg, args...) } -// CritKV log by critcal level and key-values. +// CritKV log by critical level and key-values. func CritKV(ctx context.Context, msg string, args ...field.Field) { global.CritKV(ctx, msg, args...) } diff --git a/handler/logrus/logger.go b/handler/logrus/logger.go index c042793..8466c4f 100644 --- a/handler/logrus/logger.go +++ b/handler/logrus/logger.go @@ -10,7 +10,7 @@ import ( "gitoa.ru/go-4devs/log/level" ) -// Standard create new standart logrus handler. +// Standard create new standard logrus handler. // Deprecated: delete after 0.7.0 func Standard() log.Logger { return New(logrus.StandardLogger()) diff --git a/logger.go b/logger.go index f6c7f3f..a8548da 100644 --- a/logger.go +++ b/logger.go @@ -113,7 +113,7 @@ func (l Logger) AlertKVs(ctx context.Context, msg string, args ...any) { writeOutput(l.writekvs(ctx, level.Alert, msg, args)) } -// CritKVs sugared log by critcal level and key-values. +// CritKVs sugared log by critical level and key-values. func (l Logger) CritKVs(ctx context.Context, msg string, args ...any) { writeOutput(l.writekvs(ctx, level.Critical, msg, args)) } @@ -153,7 +153,7 @@ func (l Logger) AlertKV(ctx context.Context, msg string, args ...field.Field) { writeOutput(l.write(ctx, level.Alert, msg, args...)) } -// CritKV log by critcal level and key-values. +// CritKV log by critical level and key-values. func (l Logger) CritKV(ctx context.Context, msg string, args ...field.Field) { writeOutput(l.write(ctx, level.Critical, msg, args...)) } diff --git a/writter.go b/writer.go similarity index 99% rename from writter.go rename to writer.go index 44d3835..105ebaf 100644 --- a/writter.go +++ b/writer.go @@ -63,7 +63,7 @@ type option struct { out io.Writer } -// New creates standart logger. +// New creates standard logger. func New(opts ...func(*option)) Logger { log := option{ format: FormatString(field.NewEncoderText()),