diff --git a/api/swagger-spec/v1.json b/api/swagger-spec/v1.json
index 0b99b99275..c4386868d6 100644
--- a/api/swagger-spec/v1.json
+++ b/api/swagger-spec/v1.json
@@ -15627,9 +15627,6 @@
"v1.NodeStatus": {
"id": "v1.NodeStatus",
"description": "NodeStatus is information about the current status of a node.",
- "required": [
- "images"
- ],
"properties": {
"capacity": {
"type": "any",
diff --git a/cmd/libs/go2idl/go-to-protobuf/protobuf/generator.go b/cmd/libs/go2idl/go-to-protobuf/protobuf/generator.go
index e81c814002..861853b352 100644
--- a/cmd/libs/go2idl/go-to-protobuf/protobuf/generator.go
+++ b/cmd/libs/go2idl/go-to-protobuf/protobuf/generator.go
@@ -153,7 +153,6 @@ func (g *genProtoIDL) GenerateType(c *generator.Context, t *types.Type, w io.Wri
default:
return b.unknown(sw)
}
- return sw.Error()
}
// ProtobufFromGoNamer finds the protobuf name of a type (and its package, and
@@ -424,7 +423,7 @@ func memberTypeToProtobufField(locator ProtobufLocator, field *protoField, t *ty
field.Nullable = true
case types.Alias:
if err := memberTypeToProtobufField(locator, field, t.Underlying); err != nil {
- log.Printf("failed to alias: %s %s: err", t.Name, t.Underlying.Name, err)
+ log.Printf("failed to alias: %s %s: err %v", t.Name, t.Underlying.Name, err)
return err
}
if field.Extras == nil {
@@ -594,7 +593,7 @@ func membersToFields(locator ProtobufLocator, t *types.Type, localPackage types.
tag := field.Tag
if tag != -1 {
if existing, ok := byTag[tag]; ok {
- return nil, fmt.Errorf("field %q and %q in %q both have tag %d", field.Name, existing.Name, tag)
+ return nil, fmt.Errorf("field %q and %q both have tag %d", field.Name, existing.Name, tag)
}
byTag[tag] = field
}
diff --git a/cmd/libs/go2idl/parser/parse_test.go b/cmd/libs/go2idl/parser/parse_test.go
index f45e4da38c..58fa808a92 100644
--- a/cmd/libs/go2idl/parser/parse_test.go
+++ b/cmd/libs/go2idl/parser/parse_test.go
@@ -165,7 +165,7 @@ var FooAnotherVar proto.Frobber = proto.AnotherVar
t.Errorf("Wanted, got:\n%v\n-----\n%v\n", e, a)
}
if p := u.Package("base/foo/proto"); !p.HasImport("base/common/proto") {
- t.Errorf("Unexpected lack of import line: %#s", p.Imports)
+ t.Errorf("Unexpected lack of import line: %s", p.Imports)
}
}
diff --git a/contrib/mesos/pkg/executor/executor.go b/contrib/mesos/pkg/executor/executor.go
index 72d8997273..c32083c617 100644
--- a/contrib/mesos/pkg/executor/executor.go
+++ b/contrib/mesos/pkg/executor/executor.go
@@ -488,7 +488,7 @@ func (k *Executor) bindAndWatchTask(driver bindings.ExecutorDriver, task *mesos.
// within the launch timeout window we should see a pod-task update via the registry.
// if we see a Running update then we need to generate a TASK_RUNNING status update for mesos.
handlerFinished := false
- handler := watchHandler{
+ handler := &watchHandler{
expiration: watchExpiration{
timeout: launchTimer.C,
onEvent: func(taskID string) {
diff --git a/contrib/mesos/pkg/executor/registry.go b/contrib/mesos/pkg/executor/registry.go
index 11ffb28b90..f8139dfce1 100644
--- a/contrib/mesos/pkg/executor/registry.go
+++ b/contrib/mesos/pkg/executor/registry.go
@@ -118,7 +118,7 @@ func NewRegistry(client *clientset.Clientset) Registry {
return r
}
-func (r registryImpl) watch() <-chan *PodEvent {
+func (r *registryImpl) watch() <-chan *PodEvent {
return r.updates
}
@@ -130,26 +130,26 @@ func taskIDFor(pod *api.Pod) (taskID string, err error) {
return
}
-func (r registryImpl) shutdown() {
+func (r *registryImpl) shutdown() {
//TODO(jdef) flesh this out
r.m.Lock()
defer r.m.Unlock()
r.boundTasks = map[string]*api.Pod{}
}
-func (r registryImpl) empty() bool {
+func (r *registryImpl) empty() bool {
r.m.RLock()
defer r.m.RUnlock()
return len(r.boundTasks) == 0
}
-func (r registryImpl) pod(taskID string) *api.Pod {
+func (r *registryImpl) pod(taskID string) *api.Pod {
r.m.RLock()
defer r.m.RUnlock()
return r.boundTasks[taskID]
}
-func (r registryImpl) Remove(taskID string) error {
+func (r *registryImpl) Remove(taskID string) error {
r.m.Lock()
defer r.m.Unlock()
pod, ok := r.boundTasks[taskID]
@@ -169,7 +169,7 @@ func (r registryImpl) Remove(taskID string) error {
return nil
}
-func (r registryImpl) Update(pod *api.Pod) (*PodEvent, error) {
+func (r *registryImpl) Update(pod *api.Pod) (*PodEvent, error) {
// Don't do anything for pods without task anotation which means:
// - "pre-scheduled" pods which have a NodeName set to this node without being scheduled already.
// - static/mirror pods: they'll never have a TaskID annotation, and we don't expect them to ever change.
@@ -254,8 +254,7 @@ func copyPorts(dest, src *api.Pod) bool {
return true
}
-func (r registryImpl) bind(taskID string, pod *api.Pod) error {
-
+func (r *registryImpl) bind(taskID string, pod *api.Pod) error {
// validate taskID matches that of the annotation
annotatedTaskID, err := taskIDFor(pod)
if err != nil {
diff --git a/contrib/mesos/pkg/executor/watcher.go b/contrib/mesos/pkg/executor/watcher.go
index 081e85375b..b164214618 100644
--- a/contrib/mesos/pkg/executor/watcher.go
+++ b/contrib/mesos/pkg/executor/watcher.go
@@ -55,7 +55,7 @@ type (
watcher struct {
updates <-chan *PodEvent
rw sync.RWMutex
- handlers map[string]watchHandler
+ handlers map[string]*watchHandler
filters []watchFilter
runOnce chan struct{}
}
@@ -64,7 +64,7 @@ type (
func newWatcher(updates <-chan *PodEvent) *watcher {
return &watcher{
updates: updates,
- handlers: make(map[string]watchHandler),
+ handlers: make(map[string]*watchHandler),
runOnce: make(chan struct{}),
}
}
@@ -86,7 +86,7 @@ updateLoop:
}
}
log.V(1).Info("handling " + u.FormatShort())
- h, ok := func() (h watchHandler, ok bool) {
+ h, ok := func() (h *watchHandler, ok bool) {
pw.rw.RLock()
defer pw.rw.RUnlock()
h, ok = pw.handlers[u.taskID]
@@ -125,7 +125,7 @@ func (pw *watcher) addFilter(f watchFilter) {
}
// forTask associates a handler `h` with the given taskID.
-func (pw *watcher) forTask(taskID string, h watchHandler) {
+func (pw *watcher) forTask(taskID string, h *watchHandler) {
pw.rw.Lock()
pw.handlers[taskID] = h
pw.rw.Unlock()
diff --git a/docs/api-reference/v1/definitions.html b/docs/api-reference/v1/definitions.html
index a5a09ff33a..fdf083f79c 100755
--- a/docs/api-reference/v1/definitions.html
+++ b/docs/api-reference/v1/definitions.html
@@ -4492,7 +4492,7 @@ The resulting set of endpoints can be viewed as:
images
List of container images on this node
true
false
v1.ContainerImage array