Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HostFromPath ¶
HostFromPath extracts the host portion from a URL path. e.g., "github.com/user/repo/blob/main/file.md" → "github.com"
func PathFromPath ¶
PathFromPath extracts the path portion (after the host) from a URL path. e.g., "github.com/user/repo/blob/main/file.md" → "user/repo/blob/main/file.md"
func ResolveRawURL ¶
ResolveRawURL converts a GitHub/GitLab blob URL path to a raw content URL. path is the host + path portion (e.g., "github.com/user/repo/blob/main/README.md"). Returns the raw URL and true if conversion was performed, or the original path and false.
func ResolveRepoRootURLs ¶
ResolveRepoRootURLs returns candidate raw URLs for a repository root. For repo root URLs (github.com/user/repo), returns README.md URLs for main and master branches. Returns nil if the path is not a repo root.
Types ¶
This section is empty.