add bluesky post
This commit is contained in:
8
main.go
8
main.go
@@ -14,10 +14,14 @@ func main() {
|
||||
tweetchannel := make(chan string, 1)
|
||||
d.BeginRead(tweetchannel)
|
||||
|
||||
output := output.TwitterOutput(os.Getenv("TW_ACCESS_TOKEN"), os.Getenv("TW_ACCESS_SECRET"))
|
||||
var outputs []output.OutputInterface
|
||||
outputs = append(outputs, output.TwitterOutput(os.Getenv("TW_ACCESS_TOKEN"), os.Getenv("TW_ACCESS_SECRET")))
|
||||
outputs = append(outputs, output.BlueskyOutput(os.Getenv("BSKY_IDENTIFIER"), os.Getenv("BSKY_PASSWORD")))
|
||||
|
||||
for tweet := range tweetchannel {
|
||||
fmt.Println(tweet)
|
||||
output.Write(tweet)
|
||||
for _, output := range outputs {
|
||||
output.Write(tweet)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user