💾 Archived View for hashnix.club › users › flipperzero › main-go.txt captured on 2024-08-19 at 01:30:04.
-=-=-=-=-=-=-
# below is a go formatted comment in //, underneath being the code. # remove these hash comments before proceeding // go build -ldflags "-s -w" -o stream.cgi main.go package main import ( "bufio" "fmt" "net/http" "os" ) func main() { resp, err := http.Get("https://hashnix.club:8010/hashnixradio") if err != nil { // handle error } defer resp.Body.Close() // Return Gemini response // <STATUS><SPACE><META><CR><LF> fmt.Print("20 audio/mpeg\r\n") reader := bufio.NewReader(resp.Body) reader.WriteTo(os.Stdout) }