This commit is contained in:
2025-11-12 09:41:52 +03:00
commit 2a8566712a
44 changed files with 2602 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
package request
import (
"net/http"
"strconv"
)
func Param(r *http.Request, name string) (uint64, error) {
idStr := r.PathValue(name)
id, err := strconv.ParseUint(idStr, 10, 64)
if err != nil {
return id, err
}
if id < 1 {
return id, err
}
return id, nil
}