(new): prepare v2.1.0 release
Golang lint / lint (push) Successful in 24s

- add custom LogLevel constructors and richer color configuration
- support ANSI, 256-color, RGB, and text attributes on LogLevel
- introduce clearer preferred APIs such as NewLogger and SetName
- preserve backward compatibility with deprecated wrappers for v2.0.1 APIs
- restore legacy ColorStringBuilder signatures as compatibility wrappers
- fix newline separator handling in Println-style output
- add tests for color precedence, deprecated aliases, and LogLevel attributes
- update GoDoc and bilingual README documentation
This commit is contained in:
2026-04-27 15:42:24 +03:00
parent b4c9203a79
commit 3eac1851ec
11 changed files with 669 additions and 118 deletions
+2
View File
@@ -91,6 +91,7 @@ var strftimeToGoRules = []rule{
{"%r", "03:04:05 PM"},
}
// StrftimeToGo converts a strftime-like layout into a Go time layout.
func StrftimeToGo(format string) string {
var out strings.Builder
@@ -121,6 +122,7 @@ func StrftimeToGo(format string) string {
return out.String()
}
// GoToStrftime converts a Go time layout into an approximate strftime-like layout.
func GoToStrftime(format string) string {
format = strings.ReplaceAll(format, "2006", "%Y")
format = strings.ReplaceAll(format, "06", "%y")