Another update from ingydotnet^djgoku

This commit is contained in:
Ingy döt Net 2015-11-18 06:14:39 +00:00
parent 91df62d461
commit 948b86eafa
7604 changed files with 108452 additions and 22726 deletions

View file

@ -1,16 +1,21 @@
package main
import (
"fmt"
"net/url"
"fmt"
"log"
"net/url"
)
const escaped = "http%3A%2F%2Ffoo%20bar%2F"
func main() {
if u, err := url.QueryUnescape(escaped); err == nil {
fmt.Println(u)
} else {
fmt.Println(err)
}
for _, escaped := range []string{
"http%3A%2F%2Ffoo%20bar%2F",
"google.com/search?q=%60Abdu%27l-Bah%C3%A1",
} {
u, err := url.QueryUnescape(escaped)
if err != nil {
log.Println(err)
continue
}
fmt.Println(u)
}
}