first version
This commit is contained in:
26
main_debug.go
Normal file
26
main_debug.go
Normal file
@@ -0,0 +1,26 @@
|
||||
//go:build debug
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"log/slog"
|
||||
"os"
|
||||
"runtime"
|
||||
"runtime/debug"
|
||||
)
|
||||
|
||||
func main() {
|
||||
slog.SetLogLoggerLevel(slog.LevelDebug)
|
||||
|
||||
ctx, cancelFunc := context.WithCancel(context.Background())
|
||||
defer cancelFunc()
|
||||
|
||||
debug.SetTraceback("all")
|
||||
|
||||
fmt.Printf("docker-updater -- debug (%s/%s)\n\n", runtime.GOOS, runtime.GOARCH)
|
||||
slog.Debug("debug mode enabled", "thread", "main")
|
||||
|
||||
os.Exit(run(ctx, true))
|
||||
}
|
||||
Reference in New Issue
Block a user