Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import (
- "fmt"
- "net/url"
- )
- const expected = "/object/test%2Fbar%20baz"
- func main() {
- uri := "/object/"
- name := "test/bar baz"
- fmt.Printf("%-25s %sn", "Expected:", expected)
- fmt.Printf("%-25s %sn", "Actual :", uri+url.PathEscape(name))
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement