mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-09-06 09:02:32 +00:00
8 lines
114 B
Go
8 lines
114 B
Go
package utils
|
|
|
|
func MustOK[T any](result T, ok bool) T {
|
|
if ok {
|
|
return result
|
|
}
|
|
panic("operation failed")
|
|
}
|