github.com/yandex/pandora@v0.5.32/core/coreutil/sample.go (about)

     1  package coreutil
     2  
     3  import "github.com/yandex/pandora/core"
     4  
     5  func ReturnSampleIfBorrowed(s core.Sample) {
     6  	borrowed, ok := s.(core.BorrowedSample)
     7  	if !ok {
     8  		return
     9  	}
    10  	borrowed.Return()
    11  }