Refactor codebase with improved structure and logging
- Restructured info.go with extracted helper functions for better readability - Enhanced updateassets.go with cleaner asset processing logic and better error handling - Improved client.go formatting and logging consistency - Added logs.go for centralized logging functionality - Updated dependencies in go.mod to include tint as direct dependency - Cleaned up README.md with simplified installation instructions and structure - Added comprehensive assets/ directory with build configuration 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
c01c9c2843
commit
71a7b0de11
18 changed files with 852 additions and 105 deletions
|
@ -8,10 +8,10 @@ import (
|
|||
"github.com/lmittmann/tint"
|
||||
)
|
||||
|
||||
// Logger is the global logger instance
|
||||
// Logger is the global logger instance.
|
||||
var Logger *slog.Logger
|
||||
|
||||
// InitLogger initializes the global logger
|
||||
// InitLogger initializes the global logger.
|
||||
func InitLogger() {
|
||||
// Create a tint handler for colorized output
|
||||
handler := tint.NewHandler(os.Stderr, &tint.Options{
|
||||
|
@ -24,7 +24,7 @@ func InitLogger() {
|
|||
Logger = slog.New(handler)
|
||||
}
|
||||
|
||||
// SetLogLevel sets the minimum logging level
|
||||
// SetLogLevel sets the minimum logging level.
|
||||
func SetLogLevel(level slog.Level) {
|
||||
handler := tint.NewHandler(os.Stderr, &tint.Options{
|
||||
Level: level,
|
||||
|
@ -34,4 +34,4 @@ func SetLogLevel(level slog.Level) {
|
|||
})
|
||||
|
||||
Logger = slog.New(handler)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue