From 61d64e7ae4af61bb9dd6788b7801fe4bc665e774 Mon Sep 17 00:00:00 2001 From: John Date: Sat, 11 May 2019 18:47:35 +0800 Subject: [PATCH] remove gvar.VarRead --- g/os/gcmd/gcmd_option.go | 2 +- g/os/gcmd/gcmd_value.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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) }