func()

in cli/net/net.go [224:238]


func (net *Network) openResource(resourceUrl string) (io.ReadCloser, error) {
	u, err := url.Parse(resourceUrl)
	if err != nil {
		return nil, err
	}
	if "" == u.Scheme || "file" == u.Scheme {
		return net.openFileResource(u)

	} else if "http" == u.Scheme || "https" == u.Scheme {
		return net.openHttpResource(resourceUrl)

	} else {
		return nil, errors.New("Unrecognised protocol scheme: " + u.Scheme)
	}
}