Skip to content

Commit

Permalink
build: fix static errors from golangci-lint (ddev#6710)
Browse files Browse the repository at this point in the history
  • Loading branch information
stasadev authored Nov 11, 2024
1 parent da51ad4 commit 5bb7523
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pkg/ddevapp/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ func (p *Provider) getDownloadDir() string {
return destDir
}

func (p *Provider) doFilesPullCommand() (filename []string, error error) {
func (p *Provider) doFilesPullCommand() ([]string, error) {
destDir := filepath.Join(p.getDownloadDir(), "files")
_ = os.RemoveAll(destDir)
_ = os.MkdirAll(destDir, 0755)
Expand All @@ -324,7 +324,7 @@ func (p *Provider) doFilesPullCommand() (filename []string, error error) {

// getDatabaseBackups retrieves database using `generic backup database`, then
// describe until it appears, then download it.
func (p *Provider) getDatabaseBackups() (filename []string, error error) {
func (p *Provider) getDatabaseBackups() ([]string, error) {
err := os.RemoveAll(p.getDownloadDir())
if err != nil {
return nil, err
Expand Down
4 changes: 2 additions & 2 deletions pkg/globalconfig/global_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ func TestGetFreePort(t *testing.T) {
// Put 100 used ports in the UsedHostPorts
i, err := strconv.Atoi(startPort)
i = i + 1
max := i + 100
maximum := i + 100
require.NoError(t, err)
ports := []string{}
for ; i < max; i++ {
for ; i < maximum; i++ {
ports = append(ports, strconv.Itoa(i))
}
// Make sure we have a global config set up.
Expand Down

0 comments on commit 5bb7523

Please sign in to comment.