currentPage derives page number from offset and limit.
(offset, limit int)
| 86 | |
| 87 | // currentPage derives page number from offset and limit. |
| 88 | func currentPage(offset, limit int) int { |
| 89 | if limit == 0 { |
| 90 | return 1 |
| 91 | } |
| 92 | return (offset / limit) + 1 |
| 93 | } |
| 94 | |
| 95 | // scanNullString returns empty string for NULL columns. |
| 96 | func scanNullString(ns sql.NullString) string { |
no outgoing calls
no test coverage detected