new: add config hub

This commit is contained in:
ngn
2024-05-05 21:22:45 +03:00
parent cb150c9280
commit 12e3b0c2d4
11 changed files with 343 additions and 18 deletions

View File

@ -1,12 +1,27 @@
package lib
import (
"fmt"
"strings"
"time"
"github.com/gofiber/fiber/v2"
"github.com/russross/blackfriday/v2"
)
// python3 -c "import string; print(string.ascii_letters+string.digits+\" /,_-?!'\\\"\")"
var valid string = `abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 /,_-?!'"`
func IsStringValid(s string) bool{
for _, c := range s {
if !strings.Contains(valid, string(c)){
fmt.Printf("%c\n", c)
return false
}
}
return true
}
func RenderError(c *fiber.Ctx, code int) error{
var msg string = "Server Error"
c.Status(code)