I have a redis hash that has a key "has_ended" that I want to convert to a boolean value.
someMap, _ := rv.redis.HGetAll(key).Result() // returns map[string]interface{}
hasEnded := someMap["has_ended"]
If the key "has_ended" isn't present in the map and I try to convert it to a boolean it will crash. How can I write this safely?