mirror of
https://github.com/crazybber/awesome-patterns.git
synced 2024-11-22 20:56:02 +03:00
d1e5d3f1c1
Just finish the first pharse
28 lines
364 B
Go
28 lines
364 B
Go
package main
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/davecgh/go-spew/spew"
|
|
)
|
|
|
|
type FetchResult struct {
|
|
Domain string
|
|
StatusCode uint
|
|
Header string
|
|
}
|
|
|
|
func dummyFetchUrl(url string) *FetchResult {
|
|
time.Sleep(time.Second * 1)
|
|
return &FetchResult{
|
|
url,
|
|
200,
|
|
"Dummy Header",
|
|
}
|
|
}
|
|
|
|
func main() {
|
|
r := dummyFetchUrl("http://www.google.com")
|
|
spew.Dump(r)
|
|
}
|