-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
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
Question: How to parse multiple yaml resource in a single file #71
Comments
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
There is no response from maintainer. Closing this issue. |
@amustaque97 the PR I just raised yesterday should help in this: #79 Decoder supports reading from stream, so something like this: d := yaml.NewDecoder(reader)
var objs []any
for {
var obj any
err := d.Decode(&obj)
if errors.Is(err, io.EOF) {
break
} else if err != nil {
panic(err)
}
objs = append(objs, obj)
} |
Hi team,
I have a single yaml file let us suppose
config.yml
and it has multiple yaml configuration separated by---
(three dashes). I'm usingYAMLToJSON
function to convert it to json but it is not returning 2nd resource config.yaml/yaml.go
Line 111 in 9535b3b
Does anyone how to do it?
Thanks
The text was updated successfully, but these errors were encountered: