Skip to content

Commit

Permalink
drop support for go versions <= 1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
John Eikenberry committed Jan 26, 2018
1 parent 4ab81b0 commit 0cf3188
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 42 deletions.
17 changes: 17 additions & 0 deletions packet-manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package sftp

import (
"encoding"
"sort"
"sync"
)

Expand Down Expand Up @@ -37,6 +38,22 @@ func newPktMgr(sender packetSender) *packetManager {
return s
}

type responsePackets []responsePacket

func (r responsePackets) Sort() {
sort.Slice(r, func(i, j int) bool {
return r[i].id() < r[j].id()
})
}

type requestPacketIDs []uint32

func (r requestPacketIDs) Sort() {
sort.Slice(r, func(i, j int) bool {
return r[i] < r[j]
})
}

// register incoming packets to be handled
// send id of 0 for packets without id
func (s *packetManager) incomingPacket(pkt requestPacket) {
Expand Down
21 changes: 0 additions & 21 deletions packet-manager_go1.8.go

This file was deleted.

21 changes: 0 additions & 21 deletions packet-manager_legacy.go

This file was deleted.

0 comments on commit 0cf3188

Please sign in to comment.