Skip to content

Commit

Permalink
Merge pull request #35 from krakend/deepsource-autofix-392f9594
Browse files Browse the repository at this point in the history
refactor: replace empty slice literal with `var`
  • Loading branch information
taik0 authored Jan 9, 2025
2 parents 6bf1b18 + 0b6104c commit 8d35645
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions plugin/analyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type Diff struct {

// Compare generates a list of diffs (incompatibility) between two descriptors
func (d Descriptor) Compare(other Descriptor) []Diff {
diffs := []Diff{}
var diffs []Diff

for pkgName, expectedVersion := range d.Deps {
v, ok := other.Deps[pkgName]
Expand Down Expand Up @@ -103,7 +103,8 @@ func cleanVersion(v string) string {
}

func parseSumFile(r io.Reader) ([]string, error) {
lines := []string{}
var lines []string

scanner := bufio.NewScanner(r)
for scanner.Scan() {
lines = append(lines, scanner.Text())
Expand Down

0 comments on commit 8d35645

Please sign in to comment.