data/misc.go
func GetUint64Setting(db *reform.DB, key string) (uint64, error) {
	var setting Setting
	err := db.FindByPrimaryKeyTo(&setting, key)
	if err != nil {
		if err == sql.ErrNoRows {
			return 0, fmt.Errorf("key %s is not exist"+
				" in Setting table", key)
		}
		return 0, err
	}

	value, err := strconv.ParseUint(setting.Value, 10, 64)
	if err != nil {
		return 0, fmt.Errorf("failed to parse %s setting: %v",
			key, err)
	}

	return value, nil

}
func GetUint64Setting(db *reform.DB, key string) (uint64, error) {
	var setting Setting
	err := db.FindByPrimaryKeyTo(&setting, key)
	if err != nil {
		if err == sql.ErrNoRows {
			return 0, fmt.Errorf("key %s is not exist"+
				" in Setting table", key)
		}
		return 0, err
	}

	value, err := strconv.ParseUint(setting.Value, 10, 64)
	if err != nil {
		return 0, fmt.Errorf("failed to parse %s setting: %v",
			key, err)
	}

	return value, nil

}
// GetUint64Setting finds the key value in table Setting.
// Checks that the value in the format of uint64