MCPcopy
hub / github.com/google/seesaw / SourceByName

Function SourceByName

engine/config/config.go:64–71  ·  view source on GitHub ↗

SourceByName returns the source that has the given name.

(name string)

Source from the content-addressed store, hash-verified

62
63// SourceByName returns the source that has the given name.
64func SourceByName(name string) (Source, error) {
65 for s, n := range sourceNames {
66 if n == name {
67 return s, nil
68 }
69 }
70 return -1, fmt.Errorf("unknown source %q", name)
71}
72
73// String returns the string representation of a source.
74func (s Source) String() string {

Callers 1

ConfigSourceMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected