github

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 1, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidGitHubURL = errors.New("invalid GitHub URL")
	ErrNotGitHubURL     = errors.New("not a GitHub URL")
)

Common errors for GitHub operations

Functions

func ConvertGitHubURLToRaw

func ConvertGitHubURLToRaw(githubURL, token string) (string, error)

ConvertGitHubURLToRaw converts a GitHub URL to a raw.githubusercontent.com URL If token is provided, it uses it for private repositories

func IsGitHubURL

func IsGitHubURL(url string) bool

IsGitHubURL checks if a URL is a GitHub URL

func NormalizeGitHubURL

func NormalizeGitHubURL(url string) string

NormalizeGitHubURL removes protocol prefixes and ensures consistent format

func TrimGitHubPrefix

func TrimGitHubPrefix(url string) string

TrimGitHubPrefix removes the "@" prefix from a GitHub URL if present

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL