feat: bootstrap.

This commit is contained in:
Bobo
2025-04-01 18:06:05 +08:00
parent bccb4e1b90
commit 5313e6862b
2 changed files with 5 additions and 2 deletions

View File

@@ -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])))
}
}

View File

@@ -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