mirror of
https://github.com/SourceFellows/gobuch.git
synced 2024-10-22 22:05:35 +00:00
19 lines
266 B
Go
19 lines
266 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"io/ioutil"
|
||
|
"net/http"
|
||
|
)
|
||
|
|
||
|
func main() {
|
||
|
res, err := http.Get("https://google.com")
|
||
|
if err != nil {
|
||
|
panic(err)
|
||
|
}
|
||
|
defer res.Body.Close()
|
||
|
fmt.Println(res.Status)
|
||
|
bites, _ := ioutil.ReadAll(res.Body)
|
||
|
fmt.Println(string(bites))
|
||
|
}
|