You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: sack_recovery.go
    path of file: ./repos/sliver/vendor/gvisor.dev/gvisor/pkg/tcpip/transport/tcp
    
    the code of the file until where you have to start completion: // Copyright 2020 The gVisor Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file
    
func (sr *sackRecovery) DoRecovery(rcvdSeg *segment, fastRetransmit bool) {
	snd := sr.s
	if fastRetransmit {
		snd.resendSegment()
	}

	// We are in fast recovery mode. Ignore the ack if it's out of range.
	if ack := rcvdSeg.ackNumber; !ack.InRange(snd.SndUna, snd.SndNxt+1) {
		return
	}

	// RFC 6675 recovery algorithm step C 1-5.
	end := snd.SndUna.Add(snd.SndWnd)
	dataSent := sr.handleSACKRecovery(snd.MaxPayloadSize, end)
	snd.postXmit(dataSent, true /* shouldScheduleProbe */)
}