-
Notifications
You must be signed in to change notification settings - Fork 156
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
Switch to use internal diff package #697
Conversation
The following files are not gofmt-ed. By commenting result_test.go--- pkg/app/piped/diff/result_test.go.orig
+++ pkg/app/piped/diff/result_test.go
@@ -22,7 +22,7 @@
func TestFindOne(t *testing.T) {
nodes := []Node{
- Node{PathString: "spec.template.spec"},
+ {PathString: "spec.template.spec"},
}
testcases := []struct {
@@ -62,9 +62,9 @@
func TestFind(t *testing.T) {
nodes := []Node{
- Node{PathString: "spec.replicas"},
- Node{PathString: "spec.template.spec.containers.0.image"},
- Node{PathString: "spec.template.spec.containers.1.image"},
+ {PathString: "spec.replicas"},
+ {PathString: "spec.template.spec.containers.0.image"},
+ {PathString: "spec.template.spec.containers.1.image"},
}
testcases := []struct {
|
/golinter fmt |
Code coverage for golang is |
pkg/app/piped/diff/renderer.go
Outdated
case reflect.String: | ||
return v.String(), false | ||
|
||
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just in case, let me confirm that Uints are unneeded?
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: | |
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I skipped them because our current algorithm is only for k8s.Unstructured
where it contains only simple primitive types such as string, float, int, bool, []interface{}, map[string]interface{}.
But let me add them for using later (maybe).
LGTM with just one question. |
I have just updated for your reviews. |
Thanks! |
Code coverage for golang is |
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Does this PR introduce a user-facing change?:
/cc @nakabonne