fork
Configure Feed
Select the types of activity you want to include in your feed.
Live video on the AT Protocol
fork
Configure Feed
Select the types of activity you want to include in your feed.
1package cmd
2
3import (
4 "fmt"
5 "io"
6 "net/http"
7 "os"
8)
9
10func Stream(u string) error {
11 resp, err := http.Get(u)
12 if err != nil {
13 return err
14 }
15 if resp.StatusCode != 200 {
16 return fmt.Errorf("http status %s", resp.Status)
17 }
18 _, err = io.Copy(os.Stdout, resp.Body)
19 if err != nil {
20 return fmt.Errorf("failed copying body: %w", err)
21 }
22 return nil
23}