Skip to content

Commit

Permalink
fix lints
Browse files Browse the repository at this point in the history
Signed-off-by: cpanato <ctadeu@gmail.com>
  • Loading branch information
cpanato committed Jun 5, 2023
1 parent 1515919 commit 1ff032d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
9 changes: 1 addition & 8 deletions pkg/releaser/releaser.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,6 @@ func (c *DefaultHTTPClient) Get(url string) (resp *http.Response, err error) {
return http.Get(url) // nolint: gosec
}

// func (c *DefaultHttpClient) GetWithToken(url string, token string) (resp *http.Response, err error) {
// req, _ := http.NewRequest("GET", url, nil)
// req.Header.Add("Authorization", fmt.Sprintf("token %s", token))
// client := &http.Client{}
// return client.Do(req)
// }

type Releaser struct {
config *config.Options
github GitHub
Expand Down Expand Up @@ -353,7 +346,7 @@ func (r *Releaser) CreateReleases() error {
if err != nil {
return err
}
defer r.git.RemoveWorktree("", worktree) // nolint, errcheck
defer r.git.RemoveWorktree("", worktree) //nolint: errcheck

pkgTargetPath := filepath.Join(worktree, filepath.Base(p))
if err := copyFile(p, pkgTargetPath); err != nil {
Expand Down
5 changes: 0 additions & 5 deletions pkg/releaser/releaser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ type FakeGit struct {
mock.Mock
}

type MockClient struct {
statusCode int
file string
}

func (f *FakeGit) AddWorktree(workingDir string, committish string) (string, error) {
dir, err := os.MkdirTemp("", "chart-releaser-")
if err != nil {
Expand Down

0 comments on commit 1ff032d

Please sign in to comment.