You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I want to be able to get the values of a (say mapping) node, including comments.
Describe the solution you'd like
Let's say for example we have the following yaml
apiVersion: helm.toolkit.fluxcd.io/v2beta1kind: HelmReleasemetadata:
name: myappnamespace: defaultspec:
chart:
spec:
# THIS IS A COMMENTchart: charts/myappreconcileStrategy: RevisionsourceRef:
kind: GitRepositoryname: my-branchnamespace: systems
I want to be able to do something like the following:
(assume file is an *os.File with the above contents)
path, err:=yaml.PathString("$.spec.chart")
node, err:=path.ReadNode(file)
contents:=node.GetContents() // or node.GetChildren() or whateverfmt.Println(contents)
result
# THIS IS A COMMENT
chart: charts/myapp
reconcileStrategy: Revision
sourceRef:
kind: GitRepository
name: my-branch
namespace: systems
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I want to be able to get the values of a (say mapping) node, including comments.
Describe the solution you'd like
Let's say for example we have the following
yaml
I want to be able to do something like the following:
(assume
file
is an*os.File
with the above contents)result
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: