增加getuint64/32的方法

This commit is contained in:
2025-12-07 01:09:52 +08:00
parent 5cfa0d7ce5
commit 545c6ef6a4
3 changed files with 54 additions and 0 deletions

View File

@@ -984,6 +984,22 @@ func (f *Factory) GetQueryInt64(r *http.Request, key string, defaultValue int64)
return commonhttp.GetQueryInt64(r, key, defaultValue)
}
// GetQueryUint64 获取uint64查询参数黑盒模式推荐使用
// r: HTTP请求
// key: 参数名
// defaultValue: 默认值
func (f *Factory) GetQueryUint64(r *http.Request, key string, defaultValue uint64) uint64 {
return commonhttp.GetQueryUint64(r, key, defaultValue)
}
// GetQueryUint32 获取uint32查询参数黑盒模式推荐使用
// r: HTTP请求
// key: 参数名
// defaultValue: 默认值
func (f *Factory) GetQueryUint32(r *http.Request, key string, defaultValue uint32) uint32 {
return commonhttp.GetQueryUint32(r, key, defaultValue)
}
// GetQueryBool 获取布尔查询参数(黑盒模式,推荐使用)
// r: HTTP请求
// key: 参数名