completed adding MediaLofi for kontor-gin
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3s

This commit is contained in:
Thomas Peetz
2026-10-09 18:24:30 +02:00
parent 798c88198c
commit 075695fae6
24 changed files with 471 additions and 178 deletions
+22
View File
@@ -0,0 +1,22 @@
package helpers
import (
"log/slog"
"net/url"
)
func StripUrl(webLink string, keepParam string) string {
u, err := url.Parse(webLink)
if err != nil {
slog.Info("StripUrl", "error", err)
return webLink
}
values := u.Query()
for key := range values {
if key != keepParam {
values.Del(key)
}
}
u.RawQuery = values.Encode()
return u.String()
}