shad-go/lectures/06-http/simpleget/simpleget.go

15 lines
169 B
Go
Raw Normal View History

2020-04-02 11:42:31 +00:00
package main
import (
"fmt"
"net/http"
)
func main() {
resp, err := http.Get("https://golang.org")
if err != nil {
panic(err)
}
fmt.Println(resp.StatusCode)
}