Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

Commit

Permalink
golangci-lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
laverya committed Dec 29, 2020
1 parent 7f3f90e commit 01daf66
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion integration/base/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func TestShipApp(t *testing.T) {
}

var _ = Describe("ship app", func() {
dockerClient, err := client.NewEnvClient()
dockerClient, err := client.NewClientWithOpts(client.FromEnv)
if err != nil {
panic(err)
}
Expand Down
2 changes: 1 addition & 1 deletion integration/init/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func TestInit(t *testing.T) {
}

var _ = Describe("ship init with arbitrary upstream", func() {
dockerClient, err := client.NewEnvClient()
dockerClient, err := client.NewClientWithOpts(client.FromEnv)
if err != nil {
panic(err)
}
Expand Down
2 changes: 1 addition & 1 deletion integration/init_app/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func TestInitReplicatedApp(t *testing.T) {
}

var _ = Describe("ship init replicated.app/...", func() {
dockerClient, err := client.NewEnvClient()
dockerClient, err := client.NewClientWithOpts(client.FromEnv)
if err != nil {
panic(err)
}
Expand Down
4 changes: 2 additions & 2 deletions integration/unfork/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func TestUnfork(t *testing.T) {
}

var _ = Describe("ship unfork", func() {
dockerClient, err := client.NewEnvClient()
dockerClient, err := client.NewClientWithOpts(client.FromEnv)
if err != nil {
panic(err)
}
Expand Down Expand Up @@ -111,7 +111,7 @@ var _ = Describe("ship unfork", func() {
if testMetadata.IgnoredKeys == nil {
testMetadata.IgnoredKeys = make(map[string][]string)
}
if _, ok := testMetadata.IgnoredKeys[".ship/state.json"]; ok {
if _, ok := testMetadata.IgnoredKeys[".ship/state.json"]; ok { //nolint:gosimple
testMetadata.IgnoredKeys[".ship/state.json"] = append(testMetadata.IgnoredKeys[".ship/state.json"], "v1.shipVersion")
} else {
testMetadata.IgnoredKeys[".ship/state.json"] = []string{"v1.shipVersion"}
Expand Down
2 changes: 1 addition & 1 deletion integration/update/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func TestShipUpdate(t *testing.T) {
}

var _ = Describe("ship update", func() {
dockerClient, err := client.NewEnvClient()
dockerClient, err := client.NewClientWithOpts(client.FromEnv)
if err != nil {
panic(err)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/helm/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func newTemplateCmd(out io.Writer) *cobra.Command {

cmd := &cobra.Command{
Use: "template [flags] CHART",
Short: fmt.Sprintf("locally render templates"),
Short: "locally render templates",
Long: templateDesc,
SilenceErrors: true,
SilenceUsage: true,
Expand Down
2 changes: 1 addition & 1 deletion pkg/lifecycle/daemon/routes_navcycle_getstep.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ func (d *NavcycleRoutes) getActions(step daemontypes.Step) []daemontypes.Action
Text: "Saving",
LoadingText: "Save",
OnClick: daemontypes.ActionRequest{
URI: fmt.Sprintf("/helm-values"),
URI: "/helm-values",
Method: "POST",
Body: "",
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/lifecycle/daemon/routes_navcycle_getstep_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ func TestHydrateStep(t *testing.T) {
Text: "Saving",
LoadingText: "Save",
OnClick: daemontypes.ActionRequest{
URI: fmt.Sprintf("/helm-values"),
URI: "/helm-values",
Method: "POST",
Body: "",
},
Expand Down
4 changes: 2 additions & 2 deletions pkg/lifecycle/daemon/routes_navcycle_kustomize_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ func TestV2KustomizeSaveFile(t *testing.T) {
}
diff := deep.Equal(&test.ExpectState, c)
if len(diff) != 0 {
fmt.Print(fmt.Sprintf("Failed diff compare with %s", strings.Join(diff, "\n")))
fmt.Printf("Failed diff compare with %s", strings.Join(diff, "\n"))
return false
}
return true
Expand Down Expand Up @@ -281,7 +281,7 @@ func TestV2KustomizeDeleteFile(t *testing.T) {
}
diff := deep.Equal(&test.ExpectState, c)
if len(diff) != 0 {
fmt.Print(fmt.Sprintf("Failed diff compare with %s", strings.Join(diff, "\n")))
fmt.Printf("Failed diff compare with %s", strings.Join(diff, "\n"))
return false
}
return true
Expand Down
2 changes: 1 addition & 1 deletion pkg/lifecycle/render/helm/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ func fixLines(lines []string) []string {

// returns true if the second line is a child of the first
func checkIsChild(firstLine, secondLine string) bool {
cutset := fmt.Sprintf(" \t")
cutset := " \t"
firstIndentation := len(firstLine) - len(strings.TrimLeft(firstLine, cutset))
secondIndentation := len(secondLine) - len(strings.TrimLeft(secondLine, cutset))

Expand Down
2 changes: 1 addition & 1 deletion pkg/ship/dig.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func buildInjector(v *viper.Viper) (*dig.Container, error) {

docker.NewStep,

dockercli.NewEnvClient,
dockercli.NewEnvClient, //nolint

dockerlayer.NewUnpacker,
dockerlayer.TarArchiver,
Expand Down

0 comments on commit 01daf66

Please sign in to comment.