mirror of
https://gitee.com/johng/gf
synced 2026-06-26 17:35:40 +08:00
remove gvar.VarRead
This commit is contained in:
@ -28,5 +28,5 @@ func (c *gCmdOption) Get(key string, def...string) string {
|
||||
// GetVar returns the option value as *gvar.Var object specified by <key>,
|
||||
// if value does not exist, then returns <def> as its default value.
|
||||
func (c *gCmdOption) GetVar(key string, def...string) *gvar.Var {
|
||||
return gvar.NewRead(c.Get(key, def...), true)
|
||||
return gvar.New(c.Get(key, def...), true)
|
||||
}
|
||||
|
||||
@ -28,5 +28,5 @@ func (c *gCmdValue) Get(index int, def...string) string {
|
||||
// GetVar returns value by index <index> as *gvar.Var object,
|
||||
// if value does not exist, then returns <def> as its default value.
|
||||
func (c *gCmdValue) GetVar(index int, def...string) *gvar.Var {
|
||||
return gvar.NewRead(c.Get(index, def...), true)
|
||||
return gvar.New(c.Get(index, def...), true)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user