url lol
This commit is contained in:
parent
e8c02ab241
commit
f1b5e45784
2
README
2
README
@ -64,7 +64,6 @@ gobyexample.com signups
|
|||||||
* environment variables
|
* environment variables
|
||||||
* dns
|
* dns
|
||||||
* timers
|
* timers
|
||||||
* url
|
|
||||||
* tty
|
* tty
|
||||||
* iota
|
* iota
|
||||||
* apps with multiple named binaries
|
* apps with multiple named binaries
|
||||||
@ -79,6 +78,7 @@ gobyexample.com signups
|
|||||||
* oauth for google domains
|
* oauth for google domains
|
||||||
* connection pool
|
* connection pool
|
||||||
* typed json parse/unparse
|
* typed json parse/unparse
|
||||||
|
* blackfriday
|
||||||
|
|
||||||
= program ideas
|
= program ideas
|
||||||
command line client for public json api
|
command line client for public json api
|
||||||
|
23
src/xx-url.go
Normal file
23
src/xx-url.go
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import ("fmt"; "net/url"; "strings")
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
u, err := url.Parse("postgres://user:pass@host.com:5432/path?k=v#frag")
|
||||||
|
if err != nil { panic(err) }
|
||||||
|
fmt.Println(u.Scheme)
|
||||||
|
fmt.Println(u.User)
|
||||||
|
fmt.Println(u.User.Username())
|
||||||
|
p, _ := u.User.Password()
|
||||||
|
fmt.Println(p)
|
||||||
|
fmt.Println(u.Host)
|
||||||
|
split := strings.Split(u.Host, ":")
|
||||||
|
fmt.Println(split[0])
|
||||||
|
fmt.Println(split[1])
|
||||||
|
fmt.Println(u.Path)
|
||||||
|
fmt.Println(u.Fragment)
|
||||||
|
fmt.Println(u.RawQuery)
|
||||||
|
m, _ := url.ParseQuery(u.RawQuery)
|
||||||
|
fmt.Println(m)
|
||||||
|
fmt.Println(m["k"][0])
|
||||||
|
}
|
9
www/brand.md
Normal file
9
www/brand.md
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
## brand
|
||||||
|
|
||||||
|
* colors
|
||||||
|
* font
|
||||||
|
* monaco
|
||||||
|
* helvetica neue
|
||||||
|
* twitter icon
|
||||||
|
|
||||||
|
{ }
|
Loading…
x
Reference in New Issue
Block a user