Skip to content

Commit 5b36814

Browse files
committed
lint
Signed-off-by: Pavel Okhlopkov <pavel.okhlopkov@flant.com>
1 parent 7fb76f7 commit 5b36814

File tree

20 files changed

+26
-40
lines changed

20 files changed

+26
-40
lines changed

internal/bootstrap/bootstrap.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ func downloadFile(url, targetPath string) error {
271271
ctx, cancel := context.WithTimeout(context.Background(), downloadTimeout)
272272
defer cancel()
273273

274-
req, err := http.NewRequestWithContext(ctx, "GET", url, http.NoBody)
274+
req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, http.NoBody)
275275
if err != nil {
276276
return fmt.Errorf("failed to create request: %w", err)
277277
}

internal/engine/engine.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ limitations under the License.
1717
package engine
1818

1919
import (
20+
"errors"
2021
"fmt"
2122
"path"
2223
"path/filepath"
@@ -25,8 +26,6 @@ import (
2526
"strings"
2627
"text/template"
2728

28-
"errors"
29-
3029
"helm.sh/helm/v3/pkg/chart"
3130
"helm.sh/helm/v3/pkg/chartutil"
3231

internal/engine/files.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import (
2222
"strings"
2323

2424
"github.com/gobwas/glob"
25-
2625
"helm.sh/helm/v3/pkg/chart"
2726
)
2827

internal/engine/funcs.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,10 @@ package engine
1919
import (
2020
"bytes"
2121
"encoding/json"
22+
"maps"
2223
"strings"
2324
"text/template"
2425

25-
"maps"
26-
2726
"github.com/BurntSushi/toml"
2827
"github.com/Masterminds/sprig/v3"
2928
"sigs.k8s.io/yaml"

internal/helm/render.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ package helm
1919
import (
2020
"fmt"
2121

22-
"github.com/deckhouse/dmt/internal/engine"
23-
2422
"helm.sh/helm/v3/pkg/chart"
2523
"helm.sh/helm/v3/pkg/chartutil"
24+
25+
"github.com/deckhouse/dmt/internal/engine"
2626
)
2727

2828
type Renderer struct {

internal/manager/manager.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import (
2828
"text/tabwriter"
2929

3030
"github.com/fatih/color"
31-
3231
"github.com/kyokomi/emoji"
3332
"github.com/mitchellh/go-wordwrap"
3433
"helm.sh/helm/v3/pkg/chartutil"

internal/manager/validate_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ import (
55
"path/filepath"
66
"testing"
77

8+
"github.com/stretchr/testify/assert"
89
"github.com/stretchr/testify/require"
910

1011
"github.com/deckhouse/dmt/pkg/errors"
11-
12-
"github.com/stretchr/testify/assert"
1312
)
1413

1514
func TestValidateModule(t *testing.T) {

internal/module/schema/extend.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package schema
22

33
import (
44
"encoding/json"
5-
65
"maps"
76

87
"github.com/go-openapi/spec"

internal/module/sympath.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,11 @@ package module
1919
// fork from helmv3: internal/sympath/walk.go
2020

2121
import (
22+
"errors"
2223
"fmt"
2324
"os"
2425
"path/filepath"
2526
"sort"
26-
27-
"errors"
2827
)
2928

3029
// Walk walks the file tree rooted at root, calling walkFn for each file or directory

internal/promremote/promremote.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ func (c *Client) WriteProto(
122122
encoded := snappy.Encode(nil, data)
123123

124124
body := bytes.NewReader(encoded)
125-
req, err := http.NewRequestWithContext(ctx, "POST", c.writeURL, body)
125+
req, err := http.NewRequestWithContext(ctx, http.MethodPost, c.writeURL, body)
126126
if err != nil {
127127
return result, writeError{err: err}
128128
}

0 commit comments

Comments
 (0)