Skip to content

Commit

Permalink
Merge pull request #883 from tstromberg/ohnolint
Browse files Browse the repository at this point in the history
Fix minor lint errors surfaced by the 'misspell' and 'unparam' lint modules
  • Loading branch information
dgageot authored Aug 7, 2018
2 parents c630a45 + 85ad8c6 commit 53bbca8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pkg/skaffold/config/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func GetConfig(contents []byte, useDefault bool) (util.VersionedConfig, error) {
cfg := schemaVersions[version]()
err := cfg.Parse(contents, useDefault)
if cfg.GetVersion() == version {
// Versions are same hence propogate the parse error.
// Versions are same hence propagate the parse error.
return cfg, err
}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/skaffold/docker/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import (
"github.com/sirupsen/logrus"
)

// RetrieveImage is overriden for unit testing
// RetrieveImage is overridden for unit testing
var RetrieveImage = retrieveImage

func readDockerfile(workspace, absDockerfilePath string, buildArgs map[string]*string) ([]string, error) {
Expand Down
7 changes: 2 additions & 5 deletions pkg/skaffold/kubernetes/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import (
"k8s.io/api/core/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/watch"
corev1 "k8s.io/client-go/kubernetes/typed/core/v1"
)

// Client is for tests
Expand Down Expand Up @@ -105,7 +104,7 @@ func (a *LogAggregator) Start(ctx context.Context) error {
}

if a.podSelector.Select(pod) {
go a.streamLogs(ctx, client, pod)
go a.streamLogs(ctx, pod)
}
}
}
Expand All @@ -115,7 +114,7 @@ func (a *LogAggregator) Start(ctx context.Context) error {
return nil
}

func (a *LogAggregator) streamLogs(ctx context.Context, client corev1.PodsGetter, pod *v1.Pod) error {
func (a *LogAggregator) streamLogs(ctx context.Context, pod *v1.Pod) {
for _, container := range pod.Status.ContainerStatuses {
containerID := container.ContainerID
if containerID == "" || !container.Ready {
Expand Down Expand Up @@ -151,8 +150,6 @@ func (a *LogAggregator) streamLogs(ctx context.Context, client corev1.PodsGetter
a.trackedContainers.remove(containerID)
}()
}

return nil
}

func prefix(pod *v1.Pod, container v1.ContainerStatus) string {
Expand Down

0 comments on commit 53bbca8

Please sign in to comment.