Initial commit
This commit is contained in:
21
Main.go
Normal file
21
Main.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"os"
|
||||
)
|
||||
|
||||
func main() {
|
||||
var insultURL string = "https://evilinsult.com/generate_insult.php"
|
||||
|
||||
resp, err := http.Get(insultURL)
|
||||
if err != nil {
|
||||
fmt.Println("FATAL: Cannot get insult.")
|
||||
os.Exit(1)
|
||||
}
|
||||
body, _ := ioutil.ReadAll(resp.Body)
|
||||
fmt.Println(string(body))
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user