diff --git a/g/os/gcmd/gcmd_option.go b/g/os/gcmd/gcmd_option.go index b3865d3fb..ca7b2caa1 100644 --- a/g/os/gcmd/gcmd_option.go +++ b/g/os/gcmd/gcmd_option.go @@ -28,5 +28,5 @@ func (c *gCmdOption) Get(key string, def...string) string { // GetVar returns the option value as *gvar.Var object specified by , // if value does not exist, then returns 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) } diff --git a/g/os/gcmd/gcmd_value.go b/g/os/gcmd/gcmd_value.go index 4792c7614..9f9b006b9 100644 --- a/g/os/gcmd/gcmd_value.go +++ b/g/os/gcmd/gcmd_value.go @@ -28,5 +28,5 @@ func (c *gCmdValue) Get(index int, def...string) string { // GetVar returns value by index as *gvar.Var object, // if value does not exist, then returns 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) }