github.com/kelleygo/clashcore@v1.0.2/common/utils/must.go (about) 1 package utils 2 3 func MustOK[T any](result T, ok bool) T { 4 if ok { 5 return result 6 } 7 panic("operation failed") 8 }