woo
This commit is contained in:
1 parent
7bb1fe712b
commit
e924a0a345
3 files changed
+22
No files matched your search
@@ -0,0 +1,3 @@
|
||||
module lovelynet.net/http
|
||||
|
||||
go 1.17
|
||||
@@ -0,0 +1,19 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"os"
|
||||
)
|
||||
|
||||
func main() {
|
||||
resp, err := http.Get("https://google.com/")
|
||||
|
||||
if err != nil {
|
||||
fmt.Println("Error: ", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
io.Copy(os.Stdout, resp.Body)
|
||||
}
|
||||
Reference in new issue
Block a user