From 5313e6862bccbfe86d2b3953f54bec7faff67b73 Mon Sep 17 00:00:00 2001 From: Bobo Date: Tue, 1 Apr 2025 18:06:05 +0800 Subject: [PATCH] feat: bootstrap. --- bootstrap/bootstrap.go | 5 ++++- tag.bat | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/bootstrap/bootstrap.go b/bootstrap/bootstrap.go index 9d15ce9..4178dd2 100644 --- a/bootstrap/bootstrap.go +++ b/bootstrap/bootstrap.go @@ -2,6 +2,7 @@ package bootstrap import ( "fmt" + "runtime" "github.com/go-kratos/kratos/v2" "github.com/go-kratos/kratos/v2/log" @@ -90,6 +91,8 @@ func Bootstrap(initApp InitApp, serviceName, version *string) { // run the app. if err = app.Run(); err != nil { - panic(err) + buf := make([]byte, 1024) + n := runtime.Stack(buf, false) + panic(fmt.Sprintf("Panic: %v\nStack trace:\n%s", err, string(buf[:n]))) } } diff --git a/tag.bat b/tag.bat index 636f056..fe40192 100644 --- a/tag.bat +++ b/tag.bat @@ -17,7 +17,7 @@ git tag database/influxdb/v0.0.8 --force git tag database/cassandra/v0.0.8 --force git tag database/clickhouse/v0.0.8 --force -git tag bootstrap/v0.0.13 --force +git tag bootstrap/v0.0.14 --force git tag v0.5.0