diff --git a/data.go b/data.go index 3e0cf64..9cb1574 100644 --- a/data.go +++ b/data.go @@ -22,17 +22,17 @@ func RemoveCode(location int64, member_id int) { db.Del(key) } -// SetCodeRequired sets whether or not a guest code is required for a given location. +// SetCodeRequirement sets whether or not a guest code is required for a given location. // This acts as sort of a 'cache' to avoid testing guest code requirements every time. -func SetCodeRequired(location int64, required bool) { +func SetCodeRequirement(location int64, required bool) { key := fmt.Sprintf("code_required:%d", location) db.Set(key, required, 0) } -// GetCodeRequired returns whether or not a guest code is required for a given location. +// GetCodeRequirement returns whether or not a guest code is required for a given location. // This uses the const values defined in types.go: GuestCodeRequired, GuestCodeNotRequired, and Unknown. // In the case that no tests have been performed, Unknown will be returned. -func GetCodeRequired(location int64) uint { +func GetCodeRequirement(location int64) uint { key := fmt.Sprintf("code_required:%d", location) if db.Exists(key).Val() == 0 { return Unknown