Skip to content

Commit

Permalink
better refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
tejal29 committed Apr 30, 2021
1 parent 67e2439 commit 7a1957e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmd/skaffold/app/cmd/diagnose.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"fmt"
"io"

"github.com/GoogleContainerTools/skaffold/pkg/skaffold/color"
"github.com/GoogleContainerTools/skaffold/pkg/skaffold/diagnose"
"github.com/GoogleContainerTools/skaffold/pkg/skaffold/parser"
"github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext"
Expand Down Expand Up @@ -56,7 +57,7 @@ func doDiagnose(ctx context.Context, out io.Writer) error {
return err
}
if !yamlOnly {
if err := printDockerArtifact(ctx, out, configs); err != nil {
if err := printArtifactsDiagnostics(ctx, out, configs); err != nil {
return err
}
}
Expand All @@ -73,7 +74,7 @@ func doDiagnose(ctx context.Context, out io.Writer) error {
return nil
}

func printDockerArtifact(ctx context.Context, out io.Writer, configs []*latest_v1.SkaffoldConfig) error {
func printArtifactsDiagnostics(ctx context.Context, out io.Writer, configs []*latest_v1.SkaffoldConfig) error {
var pipelines []latest_v1.Pipeline
for _, cfg := range configs {
pipelines = append(pipelines, cfg.Pipeline)
Expand All @@ -93,4 +94,5 @@ func printDockerArtifact(ctx context.Context, out io.Writer, configs []*latest_v

color.Blue.Fprintln(out, "\nConfiguration")
}
return nil
}

0 comments on commit 7a1957e

Please sign in to comment.