mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-30 12:59:39 +08:00
refactor: move hrp/ to root folder
This commit is contained in:
26
cmd/cli/main.go
Normal file
26
cmd/cli/main.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/getsentry/sentry-go"
|
||||
|
||||
"github.com/httprunner/httprunner/v5/cmd"
|
||||
)
|
||||
|
||||
func main() {
|
||||
defer func() {
|
||||
if err := recover(); err != nil {
|
||||
// report panic to sentry
|
||||
sentry.CurrentHub().Recover(err)
|
||||
sentry.Flush(time.Second * 5)
|
||||
|
||||
// print panic trace
|
||||
panic(err)
|
||||
}
|
||||
}()
|
||||
|
||||
exitCode := cmd.Execute()
|
||||
os.Exit(exitCode)
|
||||
}
|
||||
Reference in New Issue
Block a user