| 1 | package transportscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/transport`/ |
| 2 | |
| 3 | import ( |
| 4 | "net/urlscip-go gomod github.com/golang/go/src go1.25.0 `net/url`/" |
| 5 | |
| 6 | giturlscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/internal/url`/ "github.com/go-git/go-git/v6/internal/urlscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/internal/url`/" |
| 7 | ) |
| 8 | |
| 9 | // ParseURL parses a remote URL string into a *url.URL. It handles: |
| 10 | // - Standard URLs (https://host/path, ssh://host/path, git://host/path) |
| 11 | // - SCP-like URLs (git@host:path) — normalized to ssh:// scheme |
| 12 | // - Local paths (/path/to/repo, C:\path) — normalized to file:// scheme |
| 13 | func ParseURLscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/plumbing/transport`/ParseURL().(endpoint string) (*urlscip-go gomod github.com/golang/go/src go1.25.0 `net/url`/.URLscip-go gomod github.com/golang/go/src go1.25.0 `net/url`/URL#, error) { |
| 14 | if u, ok := giturlscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/internal/url`/.ParseSCPscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/internal/url`/ParseSCP().(endpoint); ok { |
| 15 | return u, nil |
| 16 | } |
| 17 | |
| 18 | if u, ok := giturlscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/internal/url`/.ParseFilescip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/internal/url`/ParseFile().(endpoint); ok { |
| 19 | return u, nil |
| 20 | } |
| 21 | |
| 22 | return giturlscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/internal/url`/.ParseURLscip-go gomod github.com/go-git/go-git/v6 . `github.com/go-git/go-git/v6/internal/url`/ParseURL().(endpoint) |
| 23 | } |