Skip to content

Commit

Permalink
swap golines with gofumpt
Browse files Browse the repository at this point in the history
  • Loading branch information
hellt committed Aug 3, 2022
1 parent 1a8426e commit f806296
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .mk/lint.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
GOFUMPT_CMD := docker run --rm -it -v $(shell pwd):/work ghcr.io/hellt/gofumpt:0.3.1
GOFUMPT_CMD := docker run --rm -it -e GOFUMPT_SPLIT_LONG_LINES=on -v $(shell pwd):/work ghcr.io/hellt/gofumpt:0.3.1
GOFUMPT_FLAGS := -l -w .

GODOT_CMD := docker run --rm -it -v $(shell pwd):/work ghcr.io/hellt/godot:1.4.11
Expand All @@ -13,14 +13,14 @@ GOLANGCI_FLAGS := --config ./.github/workflows/linters/.golangci.yml run -v --fi

# when running in a CI env we use locally installed bind
ifdef CI
GOFUMPT_CMD := gofumpt
GOFUMPT_CMD := GOFUMPT_SPLIT_LONG_LINES=on gofumpt
GODOT_CMD := godot
GOLINES_CMD := golines
GOLANGCI_CMD := golangci-lint
endif


format: gofumpt godot golines # apply Go formatters
format: gofumpt godot # apply Go formatters

gofumpt:
${GOFUMPT_CMD} ${GOFUMPT_FLAGS}
Expand Down
5 changes: 4 additions & 1 deletion controllers/secret.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ func (r *SrlinuxReconciler) addOrUpdateLicenseSecret(
secret := &corev1.Secret{}

// if secret is already present in the s.Namespace, we need to update it
if err := r.Get(ctx, types.NamespacedName{Name: srlLicenseSecretName, Namespace: s.Namespace}, secret); err == nil {
if err := r.Get(ctx, types.NamespacedName{
Name: srlLicenseSecretName,
Namespace: s.Namespace,
}, secret); err == nil {
return r.updateLicenseSecret(ctx, s, log, secret)
}

Expand Down

0 comments on commit f806296

Please sign in to comment.