dominikh / go-augeas

Go bindings for augeas
MIT License
21 stars 7 forks source link

func (a Augeas) Set(path, value string) setting empty Value failure #11

Open baoailian opened 7 years ago

baoailian commented 7 years ago

If the value is empty or null, go-augeas doesn't works.

But if I used augtool command, I can setting an empty value such as

augtool> ls /files/etc/php.ini/Tidy/tidy.clean_output
augtool> print /files/etc/php.ini/Tidy/tidy.clean_output
/files/etc/php.ini/Tidy/tidy.clean_output = "Off"
augtool> set /files/etc/php.ini/Tidy/tidy.clean_output
augtool> save
Saved 1 file(s)
augtool> print /files/etc/php.ini/Tidy/tidy.clean_output
/files/etc/php.ini/Tidy/tidy.clean_output

setting an empty value for tidy.clean_output

But if I used Set(path, value string) this method , it doesn't works

How can I setting an empty value with this method ?

func (a Augeas) Set(path, value string) error {
    …
}

Thanks for your help!