repoutil

package
v0.36.0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package repoutil provides utility functions for working with GitHub repository slugs and URLs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseGitHubURL

func ParseGitHubURL(url string) (owner, repo string, err error)

ParseGitHubURL extracts the owner and repo from a GitHub URL. Handles both SSH (git@github.com:owner/repo.git) and HTTPS (https://github.com/owner/repo.git) formats.

func SanitizeForFilename

func SanitizeForFilename(slug string) string

SanitizeForFilename converts a repository slug (owner/repo) to a filename-safe string. Replaces "/" with "-". Returns "clone-mode" if the slug is empty.

func SplitRepoSlug

func SplitRepoSlug(slug string) (owner, repo string, err error)

SplitRepoSlug splits a repository slug (owner/repo) into owner and repo parts. Returns an error if the slug format is invalid.

Types

This section is empty.

Jump to

Keyboard shortcuts

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