-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
91 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
//go:build go1.21 | ||
// +build go1.21 | ||
|
||
package log | ||
|
||
import "log/slog" | ||
|
||
type ( | ||
slogAttr = slog.Attr | ||
slogValue = slog.Value | ||
) | ||
|
||
const ( | ||
slogKindGroup = slog.KindGroup | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
//go:build !go1.21 | ||
// +build !go1.21 | ||
|
||
package log | ||
|
||
type ( | ||
slogAttr struct { | ||
Key string | ||
Value slogValue | ||
} | ||
slogValue struct{} | ||
slogKind int | ||
) | ||
|
||
const slogKindGroup slogKind = iota | ||
|
||
func (slogValue) String() string { | ||
panic("should not be reached") | ||
} | ||
|
||
func (slogValue) Group() []slogAttr { | ||
panic("should not be reached") | ||
} | ||
|
||
func (slogValue) Kind() slogKind { | ||
panic("should not be reached") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters