add lint action (#19)
All checks were successful
Go Action / goaction (push) Successful in 19m15s

Reviewed-on: #19
This commit was merged in pull request #19.
This commit is contained in:
2025-12-23 22:01:14 +03:00
parent 859a8d88f7
commit 9f8f38e43f
20 changed files with 370 additions and 320 deletions

View File

@@ -13,16 +13,16 @@ import (
// Keys for "built-in" attributes.
const (
// TimeKey is the key used by the built-in handlers for the time
// KeyTime is the key used by the built-in handlers for the time
// when the log method is called. The associated Value is a [time.Time].
KeyTime = "time"
// LevelKey is the key used by the built-in handlers for the level
// KeyLevel is the key used by the built-in handlers for the level
// of the log call. The associated value is a [Level].
KeyLevel = "level"
// MessageKey is the key used by the built-in handlers for the
// KeyMessage is the key used by the built-in handlers for the
// message of the log call. The associated value is a string.
KeyMessage = "msg"
// SourceKey is the key used by the built-in handlers for the source file
// KeySource is the key used by the built-in handlers for the source file
// and line of the log call. The associated value is a string.
KeySource = "source"
// KeyName logger name.
@@ -104,6 +104,7 @@ func FormatWithBracket(enc Encoder) func(io.Writer, *entry.Entry) (int, error) {
return func(w io.Writer, data *entry.Entry) (int, error) {
buf := buffer.New()
defer func() {
buf.Free()
}()
@@ -139,6 +140,7 @@ func FormatWithBracket(enc Encoder) func(io.Writer, *entry.Entry) (int, error) {
func FormatString(enc Encoder) func(io.Writer, *entry.Entry) (int, error) {
return func(w io.Writer, entry *entry.Entry) (int, error) {
buf := buffer.New()
defer func() {
buf.Free()
}()
@@ -163,6 +165,7 @@ func FormatString(enc Encoder) func(io.Writer, *entry.Entry) (int, error) {
func FormatJSON(enc Encoder) func(w io.Writer, entry *entry.Entry) (int, error) {
return func(w io.Writer, entry *entry.Entry) (int, error) {
buf := buffer.New()
defer func() {
buf.Free()
}()