MCPcopy Index your code
hub / github.com/dagger/dagger / originToPath

Function originToPath

cmd/dagger/module.go:1163–1169  ·  view source on GitHub ↗
(origin string)

Source from the content-addressed store, hash-verified

1161}
1162
1163func originToPath(origin string) (string, error) {
1164 url, err := gitutil.ParseURL(origin)
1165 if err != nil {
1166 return "", fmt.Errorf("failed to parse git remote origin URL: %w", err)
1167 }
1168 return strings.TrimSuffix(path.Join(url.Host, url.Path), ".git"), nil
1169}
1170
1171func getExplicitModuleSourceRef() (string, bool) {
1172 if moduleNoURL {

Callers 2

module.goFile · 0.85
TestOriginToPathFunction · 0.85

Calls 1

ParseURLFunction · 0.92

Tested by 1

TestOriginToPathFunction · 0.68