Closed mbrancato closed 2 years ago
Hi, i tested your example on the current version. It works as expected on my system
$ ./kubernetes-split-yaml test.yaml
WARN[0000] Ignoring yaml file with kind missing
INFO[0000] Creating file: generated/ns1-namespace.yaml
INFO[0000] Creating file: generated/ns2-namespace.yaml
$ cat test.yaml |./kubernetes-split-yaml -
WARN[0000] Ignoring yaml file with kind missing
INFO[0000] Creating file: generated/ns1-namespace.yaml
INFO[0000] Creating file: generated/ns2-namespace.yaml
I say expected, even with the warning, since the first document is an empty document with only comments.
I performed the test on b448d8a, built and tested on Ubuntu 18.04.4 LTS under WSL1 (Windows 10) go version go1.17 linux/amd64
Can you provide more information to be able to reproduce the issue?
I reproduced it in v0.3.0, it seems to have been fixed in 3856173
Fixed :D
Hi, I ran into a panic when a YAML file has a top-level comment.
Here is a minimal example that produces this panic: