remove gvar.VarRead

This commit is contained in:
John
2019-05-11 18:47:35 +08:00
parent 883797c495
commit 61d64e7ae4
2 changed files with 2 additions and 2 deletions

View File

@ -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)
}

View File

@ -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)
}