mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 21:39:40 +02:00
12 lines
275 B
Go
12 lines
275 B
Go
|
package endpointutils
|
||
|
|
||
|
import (
|
||
|
"strings"
|
||
|
|
||
|
portainer "github.com/portainer/portainer/api"
|
||
|
)
|
||
|
|
||
|
func IsLocalEndpoint(endpoint *portainer.Endpoint) bool {
|
||
|
return strings.HasPrefix(endpoint.URL, "unix://") || strings.HasPrefix(endpoint.URL, "npipe://") || endpoint.Type == 5
|
||
|
}
|