This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SetEnvPrefix |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
// import "fmt" | |
import "testing" | |
import "os" | |
import "github.com/spf13/viper" | |
func AssertKV(t *testing.T, k string, v string){ | |
t.Log("Viper: Asserting %v = %v ",k,v) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
// import "fmt" | |
import "testing" | |
import "os" | |
import "github.com/spf13/viper" | |
func AssertKV(t *testing.T, k string, v string){ | |
t.Log("Viper: Asserting %v = %v ",k,v) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"strings" | |
"strconv" | |
"os" | |
) | |
// How do you read a struct from a line of text? | |
type Example1 struct { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/cmd/kube-controller-manager/app/BUILD b/cmd/kube-controller-manager/app/BUILD | |
index 95b19cb..3b74421 100644 | |
--- a/cmd/kube-controller-manager/app/BUILD | |
+++ b/cmd/kube-controller-manager/app/BUILD | |
@@ -25,7 +25,6 @@ go_library( | |
"//pkg/apis/batch:go_default_library", | |
"//pkg/apis/componentconfig:go_default_library", | |
"//pkg/client/clientset_generated/internalclientset:go_default_library", | |
- "//pkg/client/clientset_generated/internalclientset/typed/core/internalversion:go_default_library", | |
"//pkg/client/leaderelection:go_default_library", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1s rate: 131 total: 131 | |
I1115 07:05:55.705537 34432 trace.go:61] Trace "cacher *api.Pod: List" (started 2016-11-15 07:05:53.398304727 -0500 EST): | |
[2.203422771s] [2.203422771s] Ready | |
[2.203437983s] [15.212µs] watchCache locked acquired | |
[2.20343824s] [257ns] watchCache fresh enough | |
[2.204380526s] [942.286µs] Listed 24014 items from cache | |
[2.307147446s] [102.76692ms] Filtered 23883 items | |
[2.307171024s] [23.578µs] END | |
I1115 07:05:56.247742 34432 trace.go:61] Trace "List /api/v1/pods" (started 2016-11-15 07:05:53.39821633 -0500 EST): | |
[79.614µs] [79.614µs] About to List from storage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// output: | |
// 0 | |
// 0 | |
fmt.Println(len(e.Spec.SchedulingMismatchedPredicateResults)) | |
fmt.Println(len(a.(*v1.Pod).Spec.SchedulingMismatchedPredicateResults)) | |
// output: | |
// false | |
fmt.Println(reflect.DeepEqual( | |
e.Spec.SchedulingMismatchedPredicateResults, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// output: | |
// 0 | |
// 0 | |
fmt.Println(len(e.Spec.SchedulingMismatchedPredicateResults)) | |
fmt.Println(len(a.(*v1.Pod).Spec.SchedulingMismatchedPredicateResults)) | |
// output: | |
// false | |
fmt.Println(reflect.DeepEqual( | |
e.Spec.SchedulingMismatchedPredicateResults, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# for each file in this dir | |
# if its a go file | |
# parse the "Describe" and "It" strings | |
# extract things in [tags] | |
# add it to a map | |
# add all tags to the file map | |
# f -> t1, t2, t3 | |
# print the tags per file with counts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Ignore all calls to subresources or resources other than pods. | |
- if len(attributes.GetSubresource()) != 0 || attributes.GetResource().GroupResource() != api.Resource("pods") { | |
+ if len(attributes.GetSubresource()) != 0 || attributes.GetResource().GroupResource() != api.Resource("nodes") { | |
return nil | |
} | |
- pod, ok := attributes.GetObject().(*api.Pod) | |
+ pod, ok := attributes.GetObject().(*api.Node) |