MCPcopy Index your code
hub / github.com/docker/cli / NewSpec

Function NewSpec

cli/connhelper/ssh/ssh.go:30–36  ·  view source on GitHub ↗

NewSpec creates a [Spec] from the given ssh URL's properties. It returns an error if the URL is using the wrong scheme, contains fragments, query-parameters, or contains a password.

(sshURL *url.URL)

Source from the content-addressed store, hash-verified

28// an error if the URL is using the wrong scheme, contains fragments,
29// query-parameters, or contains a password.
30func NewSpec(sshURL *url.URL) (*Spec, error) {
31 s, err := newSpec(sshURL)
32 if err != nil {
33 return nil, fmt.Errorf("invalid SSH URL: %w", err)
34 }
35 return s, nil
36}
37
38func newSpec(u *url.URL) (*Spec, error) {
39 if u == nil {

Callers 1

ParseURLFunction · 0.85

Calls 1

newSpecFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…