go get github.com/buraksecer/go-easy-pubsub v0.0.3
Firstly, you must Init new topic operation.
topic.Init(clientId)
You can create basicly a client
topic.Create(topicName)
You can list the topic of the client
topics := topic.Topics()
for _, v := range topics.Topics {
fmt.Println(v)
}
After, you can create a new subscription
topic.CreateSubscription(topicName, subName)
You can list the subscription of the client
topic.Subscriptions(topicName)
After finally, let's go Publish first message :)
topic.Publish(topicName, "Fly me to the moon..")
And exactly, you must pull the message -_-
topic.Receive(subName)
Google pub/sub service easy way to use