mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-07-13 17:12:05 -04:00
* bump dependencies Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * bump reva and add config options Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> --------- Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
21 lines
319 B
Go
21 lines
319 B
Go
package transport
|
|
|
|
import (
|
|
"net"
|
|
)
|
|
|
|
type netListener struct{}
|
|
|
|
// getNetListener Get net.Listener from ListenOptions.
|
|
func getNetListener(o *ListenOptions) net.Listener {
|
|
if o.Context == nil {
|
|
return nil
|
|
}
|
|
|
|
if l, ok := o.Context.Value(netListener{}).(net.Listener); ok && l != nil {
|
|
return l
|
|
}
|
|
|
|
return nil
|
|
}
|