We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
yaml
apiVersion: helm.toolkit.fluxcd.io/v2beta1 kind: HelmRelease metadata: name: myapp namespace: default spec: chart: spec: # THIS IS A COMMENT chart: charts/myapp reconcileStrategy: Revision sourceRef: kind: GitRepository name: my-branch namespace: systems
I want to be able to do something like the following:
(assume file is an *os.File with the above contents)
file
*os.File
path, err := yaml.PathString("$.spec.chart") node, err := path.ReadNode(file) contents := node.GetContents() // or node.GetChildren() or whatever fmt.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:
No branches or pull requests
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: