ntfy-playground/sub.go

24 lines
312 B
Go

//go:build ignore
// +build ignore
package main
import (
"bufio"
"log"
"net/http"
)
func main() {
resp, err := http.Get("https://ntfy.sh/farts/raw")
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
scanner := bufio.NewScanner(resp.Body)
for scanner.Scan() {
println(scanner.Text())
}
}