I got stuck on this comparision:
fmt.Println("Sending: ", notification.Type, notification.Type == "sms", reflect.TypeOf(notification.Type))
this out puts as:
Sending: sms false string
This is the Notification
type
type Notification struct {
Done bool `redis:"done"`
Message string `redis:"message"`
Type string `redis:"type"`
ID string `redis:"id"`
Error error
}
And this is how I create the notification
struct
notification := &Notification{ID: notificationID}
notification.Type, err = redis.String(c.Do("GET", "notification:id:"+notification.ID+":type"))
My question is why notification.Type == "sms"
is false