package main import ( "net/http" "github.com/McKael/madon/v2" "github.com/dghubble/go-twitter/twitter" "github.com/turnage/graw/reddit" "gopkg.in/mxpv/patreon-go.v1" r "gopkg.in/rethinkdb/rethinkdb-go.v6" ) type Mi struct { session *r.Session mastodonClient *madon.Client twitterClient *twitter.Client redditBot reddit.Bot patreonClient *patreon.Client mux *http.ServeMux pushers []Pusher } func (mi *Mi) RegisterPusher(p Pusher) { mi.pushers = append(mi.pushers, p) } func (mi *Mi) RegisterRoutes() { mi.mux.HandleFunc("/blog/refresh", mi.RefreshBlog) mi.mux.HandleFunc("/.within/botinfo", botInfoPage) }