From 78b3a9514fecc0d25b8e5fba67ffa71d238b3eae Mon Sep 17 00:00:00 2001 From: Andrea Zagli Date: Mon, 11 Apr 2022 16:07:09 +0200 Subject: [PATCH] Primo import. Funzione Paginazione. --- .gitignore | 1 + go.mod | 3 ++ zakegg.go | 95 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 99 insertions(+) create mode 100644 .gitignore create mode 100644 go.mod create mode 100644 zakegg.go diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b3d54b3 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.~*~ \ No newline at end of file diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..0d28a66 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module saetta.ns0.it/zakegg + +go 1.18 diff --git a/zakegg.go b/zakegg.go new file mode 100644 index 0000000..a0a5589 --- /dev/null +++ b/zakegg.go @@ -0,0 +1,95 @@ +package zakegg + +import ( + "fmt" + "math" +) + +func Paginazione(start int, rows int, rows_x_page int, url string) string { + var page_start int + var page_end int + var page int + var pages int + + if rows_x_page == 0 { + return "" + } + + ret := "" + + if rows > rows_x_page { + ret += `` + } + + return ret +} -- 2.49.0