This commit is contained in:
benjamyn committed 2021-10-03 11:12:14 +11:00
1 parent 7bb1fe712b
commit e924a0a345
3 files changed
+22

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
module lovelynet.net/http
go 1.17
Executable
BIN
View File
Binary file not shown.
+19
View File
@@ -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)
}