mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-27 17:41:38 +00:00
clean up
This commit is contained in:
@@ -173,7 +173,8 @@ func Init() {
|
||||
log.RegisterEventWriter("test", newTestLoggerWriter)
|
||||
}
|
||||
|
||||
func Panicf(format string, args ...any) {
|
||||
// don't call os.Exit, otherwise the "defer" functions won't be executed
|
||||
panic(fmt.Sprintf(format, args...))
|
||||
// MainErrorf is used to report an error from TestMain and return a non-zero value to indicate the failure
|
||||
func MainErrorf(msg string, a ...any) int {
|
||||
_, _ = fmt.Fprintf(os.Stderr, msg+"\n", a...)
|
||||
return 1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user