20 lines
362 B
Go
20 lines
362 B
Go
//go:build linux || freebsd
|
|||
|
|
// +build linux freebsd
|
||
|
|
|
||
|
|
package api
|
||
|
|
|
||
|
|
import (
|
||
|
|
"sync"
|
||
|
|
|
||
|
|
"codeberg.org/petrbalvin/goget/internal/protocol"
|
||
|
|
protocolreg "codeberg.org/petrbalvin/goget/internal/protocol/register"
|
||
|
|
)
|
||
|
|
|
||
|
|
var registerOnce sync.Once
|
||
|
|
|
||
|
|
func registerDefaultProtocols() {
|
||
|
|
registerOnce.Do(func() {
|
||
|
|
_, _ = protocolreg.RegisterAll(protocol.GlobalRegistry)
|
||
|
|
})
|
||
|
|
}
|