diff options
Diffstat (limited to 'go-src/utils/utils.go')
| -rw-r--r-- | go-src/utils/utils.go | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/go-src/utils/utils.go b/go-src/utils/utils.go index 8d0c1c7..5676744 100644 --- a/go-src/utils/utils.go +++ b/go-src/utils/utils.go @@ -2,8 +2,6 @@ package utils import ( "os" - - ctfcmath "gitlab.com/Syndamia/ctfc/go-src/ctfcMath" ) // Repeats a rune given amount of times and returns the result as a string @@ -35,15 +33,3 @@ func AppendToFile(path string, value string) { allChatsFile.WriteString(value) allChatsFile.Close() } - -/* Pagination */ - -const PageSize = 15 - -func TotalPages(messageAmount int) int { - return ctfcmath.CeilDivInt(messageAmount, PageSize) -} - -func Paginate(page int, messages ...string) []string { - return messages[ctfcmath.MaxInt(len(messages)-PageSize*page, 0) : len(messages)-PageSize*(page-1)] -} |
