this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

use IsSet() to test cursor arg so that we could send cursor=0

+5 -4
+5 -4
cmd/goat/firehose.go
··· 79 79 } 80 80 81 81 relayHost := cctx.String("relay-host") 82 - cursor := cctx.Int("cursor") 83 82 84 83 dialer := websocket.DefaultDialer 85 84 u, err := url.Parse(relayHost) ··· 87 86 return fmt.Errorf("invalid relayHost URI: %w", err) 88 87 } 89 88 u.Path = "xrpc/com.atproto.sync.subscribeRepos" 90 - if cursor != 0 { 91 - u.RawQuery = fmt.Sprintf("cursor=%d", cursor) 89 + if cctx.IsSet("cursor") { 90 + u.RawQuery = fmt.Sprintf("cursor=%d", cctx.Int("cursor")) 92 91 } 93 - con, _, err := dialer.Dial(u.String(), http.Header{ 92 + urlString := u.String() 93 + slog.Debug("GET", "url", urlString) 94 + con, _, err := dialer.Dial(urlString, http.Header{ 94 95 "User-Agent": []string{fmt.Sprintf("goat/%s", versioninfo.Short())}, 95 96 }) 96 97 if err != nil {