golint: Fix issues in pkg/nat

Updates #14756

Signed-off-by: Dave Tucker <dt@docker.com>
This commit is contained in:
Dave Tucker 2015-07-21 14:43:32 +01:00
parent e6e9fbe4f7
commit 3c362c6d56
4 changed files with 42 additions and 29 deletions

View file

@ -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)