golint: Fix issues in pkg/nat
Updates #14756 Signed-off-by: Dave Tucker <dt@docker.com>
This commit is contained in:
parent
e6e9fbe4f7
commit
3c362c6d56
4 changed files with 42 additions and 29 deletions
|
@ -26,6 +26,9 @@ func (s *portSorter) Less(i, j int) bool {
|
|||
return s.by(ip, jp)
|
||||
}
|
||||
|
||||
// Sort sorts a list of ports using the provided predicate
|
||||
// This function should compare `i` and `j`, returning true if `i` is
|
||||
// considered to be less than `j`
|
||||
func Sort(ports []Port, predicate func(i, j Port) bool) {
|
||||
s := &portSorter{ports, predicate}
|
||||
sort.Sort(s)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue