Skip to content

Commit

Permalink
Fix potential bug caught by gobugs
Browse files Browse the repository at this point in the history
  • Loading branch information
imjasonh authored and tekton-robot committed Nov 19, 2019
1 parent 4ea201c commit 67c21f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/reconciler/pipeline/dag/dag.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func GetSchedulable(g *Graph, doneTasks ...string) (map[string]struct{}, error)
}
}

visitedNames := make([]string, len(visited))
var visitedNames []string
for v := range visited {
visitedNames = append(visitedNames, v)
}
Expand Down Expand Up @@ -217,7 +217,7 @@ func isSchedulable(doneTasks map[string]struct{}, prevs []*Node) bool {
}

func toMap(t ...string) map[string]struct{} {
m := make(map[string]struct{}, len(t))
m := map[string]struct{}{}
for _, s := range t {
m[s] = struct{}{}
}
Expand Down

0 comments on commit 67c21f8

Please sign in to comment.