Skip to content
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

Preserve YAML comments & style when resolving/applying #103

Merged
merged 8 commits into from
Nov 5, 2019

Conversation

dprotaso
Copy link
Contributor

@dprotaso dprotaso commented Oct 30, 2019

This is accomplished by adopting the yaml.v3 lib. It
exposes a Node struct that's used internally by the
yaml encoder/decoder

ko now internally manipulates YAML documents using this struct

Fixes #101

At this time some comment formatting isn't 100% preserved see: go-yaml/yaml#533

This is accomplished by adopting the yaml.v3 lib. It
exposes a Node struct that's used internally by the
yaml encoder/decoder

ko internally now manipulates YAML documents using this struct

Fixes ko-build#101
pkg/resolve/resolve.go Outdated Show resolved Hide resolved
pkg/resolve/selector.go Outdated Show resolved Hide resolved
pkg/resolve/selector.go Outdated Show resolved Hide resolved
pkg/resolve/selector.go Outdated Show resolved Hide resolved
pkg/resolve/selector.go Outdated Show resolved Hide resolved
pkg/commands/resolver.go Outdated Show resolved Hide resolved
pkg/commands/resolver_test.go Outdated Show resolved Hide resolved
dprotaso and others added 3 commits October 30, 2019 21:05
Fix comments

Co-Authored-By: jonjohnsonjr <jonjohnson@google.com>
When the yaml.Decoder returns an io.EOF it implies
there were no YAML documents decoded and that there
are no more!
pkg/resolve/resolve.go Outdated Show resolved Hide resolved
resolve comment suggestion

Co-Authored-By: jonjohnsonjr <jonjohnson@google.com>
@dprotaso dprotaso requested a review from jonjohnsonjr November 5, 2019 01:24
pkg/testutil/fixed.go Outdated Show resolved Hide resolved
@jonjohnsonjr jonjohnsonjr merged commit 4833bb4 into ko-build:master Nov 5, 2019
@dprotaso dprotaso deleted the yaml-v3 branch November 5, 2019 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adopt gopkg.in/yaml.v3
2 participants