Skip to content

Commit 6e954ce

Browse files
committed
code review rename comments
1 parent a07c8d7 commit 6e954ce

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

pkg/skaffold/build/cache/lookup.go

+1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ func (c *cache) lookupLocal(ctx context.Context, hash, tag string, entry ImageDe
7979
// Check the imageID for the tag
8080
idForTag, err := c.client.ImageID(ctx, tag)
8181
if err != nil {
82+
// Rely on actionable errors thrown from pkg/skaffold/docker.LocalDaemon api.
8283
return failed{err: err}
8384
}
8485

pkg/skaffold/build/jib/build.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ func (b *Builder) Build(ctx context.Context, out io.Writer, artifact *latest.Art
4444
return b.buildJibGradleToDocker(ctx, out, artifact.Workspace, artifact.JibArtifact, artifact.Dependencies, tag)
4545

4646
default:
47-
return "", unknownPlugin(artifact.Workspace)
47+
return "", unknownPluginType(artifact.Workspace)
4848
}
4949
}

pkg/skaffold/build/jib/errors.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
"github.com/GoogleContainerTools/skaffold/proto"
2626
)
2727

28-
func unknownPlugin(ws string) error {
28+
func unknownPluginType(ws string) error {
2929
return sErrors.NewErrorWithStatusCode(
3030
proto.ActionableErr{
3131
Message: fmt.Sprintf("Unknown Jib builder type for workspace %s", ws),
@@ -39,7 +39,7 @@ func unknownPlugin(ws string) error {
3939
})
4040
}
4141

42-
func unableToDeterminePlugin(ws string, err error) error {
42+
func unableToDeterminePluginType(ws string, err error) error {
4343
return sErrors.NewError(err,
4444
proto.ActionableErr{
4545
Message: fmt.Sprintf("unable to determine Jib builder type for workspace %s due to %s", ws, err),

pkg/skaffold/build/jib/jib.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,15 @@ func GetBuildDefinitions(workspace string, a *latest.JibArtifact) []string {
103103
func GetDependencies(ctx context.Context, workspace string, artifact *latest.JibArtifact) ([]string, error) {
104104
t, err := DeterminePluginType(workspace, artifact)
105105
if err != nil {
106-
return nil, unableToDeterminePlugin(workspace, err)
106+
return nil, unableToDeterminePluginType(workspace, err)
107107
}
108108
switch t {
109109
case JibMaven:
110110
return getDependenciesMaven(ctx, workspace, artifact)
111111
case JibGradle:
112112
return getDependenciesGradle(ctx, workspace, artifact)
113113
default:
114-
return nil, unknownPlugin(workspace)
114+
return nil, unknownPluginType(workspace)
115115
}
116116
}
117117

0 commit comments

Comments
 (0)