go-uci
go-uci copied to clipboard
Parse error when option is empty
I'm sorry, I don't speak nor read chinese. Google translates your issue into:
When the option item is empty, a parse err error will occur and the desired object cannot be parsed
Is that translation correct? If so, what do you mean by "when the option item is emtpy"?
yes.
I have identified this behaviour on my OpenWRT router:
# cat /etc/config/test
config section
option empty1
option empty2 ''
list empty3
list empty4 ''
# uci export test
package test
config section
list empty3 ''
list empty4 ''
It was easy to extend the lexer to recognize the empty/missing values properly (I personally would consider an option without value invalid.)
To fix the parser, I'll need some more time (but I don't know when that will be). Feel free to extend on e84480d if you don't want to wait :-)
3 years later; any update?
Nope, still very low on my priorities.
Feel free to submit a patch though, I'll happily merge it.
Any progress? This library cannot parse aria2 default config.
No, sorry. At the moment (and for the foreseeable future), we have close to zero maintenance capacity for this. Our use-cases are covered, so active development is de-facto halted.