Chore: Disable cgo by default for local builds (#111807)
* disable cgo by default for local builds, also set cgo variable in either case * actually do not set the default value * disable cgo for darwin, display sqlite driver in logs * fix linter warning, although I do not fully agree with it
This commit is contained in:
@@ -35,12 +35,13 @@ func IsUniqueConstraintViolation(err error) bool {
|
||||
}
|
||||
|
||||
func ErrorMessage(err error) string {
|
||||
if err == nil {
|
||||
return ""
|
||||
}
|
||||
var sqliteErr sqlite3.Error
|
||||
if errors.As(err, &sqliteErr) {
|
||||
return sqliteErr.Error()
|
||||
}
|
||||
return err.Error()
|
||||
}
|
||||
|
||||
func DriverType() string {
|
||||
return "mattn/go-sqlite3 (CGO enabled)"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user