Skip to content

Commit a1e3871

Browse files
ForestEckhardtryanmoran
authored andcommitted
Adds documentation about the behavior of a nil priority list
1 parent e6d24e9 commit a1e3871

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

draft/planner.go

+4
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ func NewPlanner() Planner {
2929
// returns the highest priority entry as well as the sorted and filtered list
3030
// of buildpack plan entries that were given. Entries with no given
3131
// version-source are the lowest priority.
32+
//
33+
// If nil is passed for the value of the priority list then the function will
34+
// just return the first filtered entry from the list of the entries that were
35+
// passed into the function initially.
3236
func (p Planner) Resolve(name string, entries []packit.BuildpackPlanEntry, priorities []interface{}) (packit.BuildpackPlanEntry, []packit.BuildpackPlanEntry) {
3337
var filteredEntries []packit.BuildpackPlanEntry
3438
for _, e := range entries {

0 commit comments

Comments
 (0)