Assuming
import (
parser "github.com/haproxytech/config-parser/v5"
)
...
p := parser.New(content, options)
Currently it's possible to obtain the parsed models for all supported attributes like
log, err := p.Get(parser.Global, parser.GlobalSectionName, "log") // ([]types.Log, error)
...
It's also possible to update the data associated with the same attribute
err := p.Set(parser.Global, parser.GlobalSectionName, "log", log)
One can also render the full config using
Proposal
In one of our use cases, we would like to obtain the resulting lines from such updates for a given attribute path.
So e.g.
lines, err := p.Render(parser.Global, parser.GlobalSectionName, "log")
Currently the lack of such granular access prevents us from effectively using the Config Parser code for our use case.
(Happily) wiling to contribute code if this feature makes sense.
Assuming
Currently it's possible to obtain the parsed models for all supported attributes like
It's also possible to update the data associated with the same attribute
One can also render the full config using
Proposal
In one of our use cases, we would like to obtain the resulting lines from such updates for a given attribute path.
So e.g.
Currently the lack of such granular access prevents us from effectively using the Config Parser code for our use case.
(Happily) wiling to contribute code if this feature makes sense.