urls.JoinPath

New in v0.112.0
{{ urls.JoinPath }} → "" (空字串)
{{ urls.JoinPath "" }} → /
{{ urls.JoinPath "a" }} → a
{{ urls.JoinPath "a" "b" }} → a/b
{{ urls.JoinPath "/a" "b" }} → /a/b
{{ urls.JoinPath "https://example.org" "b" }} → https://example.org/b

{{ urls.JoinPath (slice "a" "b") }} → a/b

path.Join 函數不同,urls.JoinPath 保留連續的開頭斜線。