mirror of
https://github.com/bloeys/nmage.git
synced 2025-12-29 13:28:20 +00:00
Improve assert+imporve error messages when adding comps
This commit is contained in:
@ -1,8 +1,6 @@
|
||||
package assert
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/bloeys/nmage/consts"
|
||||
"github.com/bloeys/nmage/logging"
|
||||
)
|
||||
@ -10,6 +8,6 @@ import (
|
||||
func T(check bool, msg string, args ...any) {
|
||||
|
||||
if consts.Debug && !check {
|
||||
logging.ErrLog.Panicln("Assert failed:", fmt.Sprintf(msg, args...))
|
||||
logging.ErrLog.Panicf("Assert failed: "+msg, args...)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user