diff --git a/database/gdb/gdb_model_condition.go b/database/gdb/gdb_model_condition.go index e95c284b6..a78c43047 100644 --- a/database/gdb/gdb_model_condition.go +++ b/database/gdb/gdb_model_condition.go @@ -95,7 +95,7 @@ func (m *Model) Group(groupBy string) *Model { // GroupBy is alias of Model.Group. // See Model.Group. -// Deprecated. +// Deprecated, use Group instead. func (m *Model) GroupBy(groupBy string) *Model { return m.Group(groupBy) } @@ -109,7 +109,7 @@ func (m *Model) Order(orderBy ...string) *Model { // OrderBy is alias of Model.Order. // See Model.Order. -// Deprecated. +// Deprecated, use Order instead. func (m *Model) OrderBy(orderBy string) *Model { return m.Order(orderBy) } @@ -153,7 +153,7 @@ func (m *Model) Page(page, limit int) *Model { // ForPage is alias of Model.Page. // See Model.Page. -// Deprecated. +// Deprecated, use Page instead. func (m *Model) ForPage(page, limit int) *Model { return m.Page(page, limit) } diff --git a/database/gdb/gdb_type_record_deprecated.go b/database/gdb/gdb_type_record_deprecated.go index a21df29c1..d07a79807 100644 --- a/database/gdb/gdb_type_record_deprecated.go +++ b/database/gdb/gdb_type_record_deprecated.go @@ -6,22 +6,22 @@ package gdb -// Deprecated. +// Deprecated, use Json instead. func (r Record) ToJson() string { return r.Json() } -// Deprecated. +// Deprecated, use Xml instead. func (r Record) ToXml(rootTag ...string) string { return r.Xml(rootTag...) } -// Deprecated. +// Deprecated, use Map instead. func (r Record) ToMap() Map { return r.Map() } -// Deprecated. +// Deprecated, use Struct instead. func (r Record) ToStruct(pointer interface{}) error { return r.Struct(pointer) } diff --git a/database/gdb/gdb_type_result_deprecated.go b/database/gdb/gdb_type_result_deprecated.go index b09c75971..8f6faf3da 100644 --- a/database/gdb/gdb_type_result_deprecated.go +++ b/database/gdb/gdb_type_result_deprecated.go @@ -6,52 +6,52 @@ package gdb -// Deprecated. +// Deprecated, use Json instead. func (r Result) ToJson() string { return r.Json() } -// Deprecated. +// Deprecated, use Xml instead. func (r Result) ToXml(rootTag ...string) string { return r.Xml(rootTag...) } -// Deprecated. +// Deprecated, use List instead. func (r Result) ToList() List { return r.List() } -// Deprecated. +// Deprecated, use MapKeyStr instead. func (r Result) ToStringMap(key string) map[string]Map { return r.MapKeyStr(key) } -// Deprecated. +// Deprecated, use MapKetInt instead. func (r Result) ToIntMap(key string) map[int]Map { return r.MapKeyInt(key) } -// Deprecated. +// Deprecated, use MapKeyUint instead. func (r Result) ToUintMap(key string) map[uint]Map { return r.MapKeyUint(key) } -// Deprecated. +// Deprecated, use RecordKeyStr instead. func (r Result) ToStringRecord(key string) map[string]Record { return r.RecordKeyStr(key) } -// Deprecated. +// Deprecated, use RecordKetInt instead. func (r Result) ToIntRecord(key string) map[int]Record { return r.RecordKeyInt(key) } -// Deprecated. +// Deprecated, use RecordKetUint instead. func (r Result) ToUintRecord(key string) map[uint]Record { return r.RecordKeyUint(key) } -// Deprecated. +// Deprecated, use Structs instead. func (r Result) ToStructs(pointer interface{}) (err error) { return r.Structs(pointer) } diff --git a/database/gredis/gredis.go b/database/gredis/gredis.go index b28b73530..744ba4da6 100644 --- a/database/gredis/gredis.go +++ b/database/gredis/gredis.go @@ -190,7 +190,7 @@ func (r *Redis) Conn() *Conn { } // Alias of Conn, see Conn. -// Deprecated. +// Deprecated, use Conn instead. func (r *Redis) GetConn() *Conn { return r.Conn() } diff --git a/net/ghttp/ghttp_request_param.go b/net/ghttp/ghttp_request_param.go index 5f7a1d4f4..f77eeeec3 100644 --- a/net/ghttp/ghttp_request_param.go +++ b/net/ghttp/ghttp_request_param.go @@ -139,14 +139,14 @@ func (r *Request) GetVar(key string, def ...interface{}) *gvar.Var { // GetRaw is alias of GetBody. // See GetBody. -// Deprecated. +// Deprecated, use GetBody instead. func (r *Request) GetRaw() []byte { return r.GetBody() } // GetRawString is alias of GetBodyString. // See GetBodyString. -// Deprecated. +// Deprecated, use GetBodyString instead. func (r *Request) GetRawString() string { return r.GetBodyString() } diff --git a/net/ghttp/ghttp_request_param_post.go b/net/ghttp/ghttp_request_param_post.go index b3147b232..8ddfa17ab 100644 --- a/net/ghttp/ghttp_request_param_post.go +++ b/net/ghttp/ghttp_request_param_post.go @@ -18,7 +18,7 @@ import ( // Note that if there're multiple parameters with the same name, the parameters are retrieved // and overwrote in order of priority: form > body. // -// Deprecated. +// Deprecated, use GetForm instead. func (r *Request) GetPost(key string, def ...interface{}) interface{} { r.parseForm() if len(r.formMap) > 0 { @@ -38,82 +38,82 @@ func (r *Request) GetPost(key string, def ...interface{}) interface{} { return nil } -// Deprecated. +// Deprecated, use GetFormVar instead. func (r *Request) GetPostVar(key string, def ...interface{}) *gvar.Var { return gvar.New(r.GetPost(key, def...)) } -// Deprecated. +// Deprecated, use GetFormString instead. func (r *Request) GetPostString(key string, def ...interface{}) string { return r.GetPostVar(key, def...).String() } -// Deprecated. +// Deprecated, use GetFormBool instead. func (r *Request) GetPostBool(key string, def ...interface{}) bool { return r.GetPostVar(key, def...).Bool() } -// Deprecated. +// Deprecated, use GetFormInt instead. func (r *Request) GetPostInt(key string, def ...interface{}) int { return r.GetPostVar(key, def...).Int() } -// Deprecated. +// Deprecated, use GetFormInt32 instead. func (r *Request) GetPostInt32(key string, def ...interface{}) int32 { return r.GetPostVar(key, def...).Int32() } -// Deprecated. +// Deprecated, use GetFormInt64 instead. func (r *Request) GetPostInt64(key string, def ...interface{}) int64 { return r.GetPostVar(key, def...).Int64() } -// Deprecated. +// Deprecated, use GetFormInts instead. func (r *Request) GetPostInts(key string, def ...interface{}) []int { return r.GetPostVar(key, def...).Ints() } -// Deprecated. +// Deprecated, use GetFormUint instead. func (r *Request) GetPostUint(key string, def ...interface{}) uint { return r.GetPostVar(key, def...).Uint() } -// Deprecated. +// Deprecated, use GetFormUint32 instead. func (r *Request) GetPostUint32(key string, def ...interface{}) uint32 { return r.GetPostVar(key, def...).Uint32() } -// Deprecated. +// Deprecated, use GetFormUint64 instead. func (r *Request) GetPostUint64(key string, def ...interface{}) uint64 { return r.GetPostVar(key, def...).Uint64() } -// Deprecated. +// Deprecated, use GetFormFloat32 instead. func (r *Request) GetPostFloat32(key string, def ...interface{}) float32 { return r.GetPostVar(key, def...).Float32() } -// Deprecated. +// Deprecated, use GetFormFloat64 instead. func (r *Request) GetPostFloat64(key string, def ...interface{}) float64 { return r.GetPostVar(key, def...).Float64() } -// Deprecated. +// Deprecated, use GetFormFloats instead. func (r *Request) GetPostFloats(key string, def ...interface{}) []float64 { return r.GetPostVar(key, def...).Floats() } -// Deprecated. +// Deprecated, use GetFormArray instead. func (r *Request) GetPostArray(key string, def ...interface{}) []string { return r.GetPostVar(key, def...).Strings() } -// Deprecated. +// Deprecated, use GetFormStrings instead. func (r *Request) GetPostStrings(key string, def ...interface{}) []string { return r.GetPostVar(key, def...).Strings() } -// Deprecated. +// Deprecated, use GetFormInterfaces instead. func (r *Request) GetPostInterfaces(key string, def ...interface{}) []interface{} { return r.GetPostVar(key, def...).Interfaces() } diff --git a/os/gcmd/gcmd.go b/os/gcmd/gcmd.go index 777a881ac..d32ca03d6 100644 --- a/os/gcmd/gcmd.go +++ b/os/gcmd/gcmd.go @@ -67,7 +67,7 @@ func GetArgAll() []string { } // GetWithEnv is alias of GetOptWithEnv. -// Deprecated. +// Deprecated, use GetOptWithEnv instead. func GetWithEnv(key string, def ...interface{}) *gvar.Var { return GetOptWithEnv(key, def...) } diff --git a/text/gstr/gstr.go b/text/gstr/gstr.go index e1805c713..903d609df 100644 --- a/text/gstr/gstr.go +++ b/text/gstr/gstr.go @@ -540,7 +540,7 @@ func SplitAndTrim(str, delimiter string, characterMask ...string) []string { // SplitAndTrimSpace splits string by a string to an array, // and calls TrimSpace to every element of this array. -// Deprecated. +// Deprecated, use SplitAndTrim instead. func SplitAndTrimSpace(str, delimiter string) []string { array := make([]string, 0) for _, v := range strings.Split(str, delimiter) {