Skip to content

Commit

Permalink
Adds documentation about the behavior of a nil priority list
Browse files Browse the repository at this point in the history
  • Loading branch information
ForestEckhardt authored and ryanmoran committed Nov 15, 2021
1 parent e6d24e9 commit a1e3871
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions draft/planner.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ func NewPlanner() Planner {
// returns the highest priority entry as well as the sorted and filtered list
// of buildpack plan entries that were given. Entries with no given
// version-source are the lowest priority.
//
// If nil is passed for the value of the priority list then the function will
// just return the first filtered entry from the list of the entries that were
// passed into the function initially.
func (p Planner) Resolve(name string, entries []packit.BuildpackPlanEntry, priorities []interface{}) (packit.BuildpackPlanEntry, []packit.BuildpackPlanEntry) {
var filteredEntries []packit.BuildpackPlanEntry
for _, e := range entries {
Expand Down

0 comments on commit a1e3871

Please sign in to comment.