MCPcopy Create free account
hub / github.com/pydio/cells / validHostPort

Function validHostPort

cmd/install-cli.go:695–707  ·  view source on GitHub ↗
(input string)

Source from the content-addressed store, hash-verified

693}
694
695func validHostPort(input string) error {
696 if e := notEmpty(input); e != nil {
697 return e
698 }
699 parts := strings.Split(input, ":")
700 if len(parts) != 2 {
701 return errors.New("Please use an [IP|DOMAIN]:[PORT] string")
702 }
703 if e := validPortNumber(parts[1]); e != nil {
704 return e
705 }
706 return nil
707}
708
709// ValidScheme validates that url is [SCHEME]://[IP or DOMAIN] "[http/https]://......."
710func validScheme(input string) error {

Callers

nothing calls this directly

Calls 3

notEmptyFunction · 0.85
validPortNumberFunction · 0.85
NewMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…