Skip to content

Commit

Permalink
an url normalization tool
Browse files Browse the repository at this point in the history
  • Loading branch information
kicool committed Feb 28, 2013
1 parent 50af448 commit a7674bf
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions util/urlnormalization.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package main

import (
"net/url"
"fmt"
"github.com/kicool/Normalize-URL"
"flag"
)

var (
arg = flag.String("url", "", "url to mormalize")
)

func main() {
flag.Parse()

u, err:=url.Parse(*arg)
if err == nil {
normalize.Normalize(u)
fmt.Println(*arg)
fmt.Println(u)
}
}


0 comments on commit a7674bf

Please sign in to comment.