Given an error, pqErrMsg will try to return pq error details if it's a pq error.
(err error)
| 124 | // Given an error, pqErrMsg will try to return pq error details |
| 125 | // if it's a pq error. |
| 126 | func pqErrMsg(err error) string { |
| 127 | if err, ok := err.(*pq.Error); ok { |
| 128 | if err.Detail != "" { |
| 129 | return fmt.Sprintf("%s. %s", err, err.Detail) |
| 130 | } |
| 131 | } |
| 132 | return err.Error() |
| 133 | } |
| 134 | |
| 135 | // makeSearchQuery cleans an optional search string and prepares the |
| 136 | // query SQL statement (string interpolated) and returns the |
no outgoing calls
no test coverage detected