17 lines
188 B
Go
17 lines
188 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"net/http"
|
||
|
"os"
|
||
|
)
|
||
|
|
||
|
func main() {
|
||
|
resp, err := http.Get("https://google.com")
|
||
|
if err != nil {
|
||
|
fmt.Println("Error!")
|
||
|
os.Exit(1)
|
||
|
}
|
||
|
fmt.Println(resp)
|
||
|
}
|