1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-22 23:09:41 +02:00
portainer/api/http/handler/endpoints/utils.go
Matt Hook 6a4a353b92
feat(environment): update wording when editing agent environment [EE-3081] (#7445)
* change wording when editing agent environment
2022-08-11 09:27:35 +12:00

18 lines
306 B
Go

package endpoints
import "strings"
func BoolAddr(b bool) *bool {
boolVar := b
return &boolVar
}
func normalizeAgentAddress(url string) string {
// Case insensitive strip http or https scheme if URL entered
index := strings.Index(url, "://")
if index >= 0 {
return url[index+3:]
}
return url
}