1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-10 05:25:58 +00:00
Former-commit-id: 9e5f0a08049b83605aa847b8f51fb856427354a6
This commit is contained in:
hiveminded
2017-09-07 16:20:31 +03:00
parent fcfc65a7bc
commit 8a9a498316
15 changed files with 184 additions and 25 deletions

View File

@@ -181,6 +181,14 @@ func (r *Store) GetInt64(key string) (int64, error) {
return strconv.ParseInt(r.GetString(key), 10, 64)
}
// GetBool returns the user's value as bool, based on its key.
// a string which is "1" or "t" or "T" or "TRUE" or "true" or "True"
// or "0" or "f" or "F" or "FALSE" or "false" or "False".
// Any other value returns an error.
func (r *Store) GetBool(key string) (bool, error) {
return strconv.ParseBool(key)
}
// Remove deletes an entry linked to that "key",
// returns true if an entry is actually removed.
func (r *Store) Remove(key string) bool {