MCPcopy Index your code
hub / github.com/jetify-com/devbox / getBaseURL

Method getBaseURL

internal/plugin/git.go:77–83  ·  view source on GitHub ↗

getBaseURL extracts the base Git URL without query parameters. Query parameters like ?dir=path are used by Nix flakes but not by git clone.

()

Source from the content-addressed store, hash-verified

75// getBaseURL extracts the base Git URL without query parameters.
76// Query parameters like ?dir=path are used by Nix flakes but not by git clone.
77func (p *gitPlugin) getBaseURL() string {
78 baseURL := p.ref.URL
79 if strings.Contains(baseURL, "?") {
80 baseURL = strings.Split(baseURL, "?")[0]
81 }
82 return baseURL
83}
84
85func (p *gitPlugin) Fetch() ([]byte, error) {
86 content, err := p.FileContent("plugin.json")

Callers 1

cloneAndReadMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected