Posted on 3rd August 2020|3993 views
How can I convert an error to a string?
Posted on 7th August 2025| views
The error type contains an interface in Go
type error interface {
Error() string
}
Thus, for an error err, you can call
err.Error()