in azkustodata/errors/errors.go [257:290]
func e(args ...interface{}) *Error {
if len(args) == 0 {
panic("call to errors.E with no arguments")
}
e := &Error{}
for _, arg := range args {
switch arg := arg.(type) {
case Op:
e.Op = arg
case string:
e.Err = errors.New(arg)
case Kind:
e.Kind = arg
case *Error:
// Make a copy
argCopy := *arg
e.Err = argCopy.Err
case error:
e.Err = arg
default:
if err, ok := arg.(error); ok {
e.Err = err
} else {
_, file, line, _ := runtime.Caller(1)
e.Kind = KOther
e.Err = fmt.Errorf("errors.E: bad call from %s:%d: %v, unknown type %T, value %v in error call", file, line, args, arg, arg)
return e
}
}
}
return e
}