• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
2
3package spdxlib
4
5import (
6	"sort"
7
8	"github.com/spdx/tools-golang/spdx/common"
9)
10
11// SortElementIDs sorts and returns the given slice of ElementIDs
12func SortElementIDs(eIDs []common.ElementID) []common.ElementID {
13	sort.Slice(eIDs, func(i, j int) bool {
14		return eIDs[i] < eIDs[j]
15	})
16
17	return eIDs
18}
19