topic builder of Firebase Cloud Messaging (FCM) for golang
// Build condition for fcm
cond, err := ToCondition(CondNot{CondTopic{"NewUserTopic"}}.And(CondTopic{"MaleUserTopic"}))
if err != nil {
log.Fatal(err)
}
fmt.Printf("Topic string: %d", cond)
// "Topic string: !('NewUserTopic' in topics) && 'MaleUserTopic' in topics"
Inspired by go-xorm/builder
fcm-builder is available under the MIT license. See the LICENSE file for more info.