1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-11 08:12:26 +08:00

doc: add play ground demo for v2.3.6

This commit is contained in:
dudaodong
2025-05-29 11:50:17 +08:00
parent cdefbde9f5
commit 539078e6b8
23 changed files with 489 additions and 153 deletions

View File

@@ -309,7 +309,7 @@ func IsTelnetConnected(host string, port string) bool {
}
// BuildUrl builds a URL from the given params.
// Play: todo
// Play: https://go.dev/play/p/JLXl1hZK7l4
func BuildUrl(scheme, host, path string, query map[string][]string) (string, error) {
if err := validateScheme(scheme); err != nil {
return "", err
@@ -371,7 +371,7 @@ var pathRegex = regexp.MustCompile(`^\/([a-zA-Z0-9%_-]+(?:\/[a-zA-Z0-9%_-]+)*)$`
var alphaNumericRegex = regexp.MustCompile(`^[a-zA-Z0-9]+$`)
// AddQueryParams adds query parameters to the given URL.
// Play: todoå
// Play: https://go.dev/play/p/JLXl1hZK7l4
func AddQueryParams(urlStr string, params map[string][]string) (string, error) {
parsedUrl, err := url.Parse(urlStr)
if err != nil {