repository

package
v2.17.1 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2026 License: MIT Imports: 7 Imported by: 89 modules, 75 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package repository is a set of types and functions for modeling and interacting with GitHub repositories.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository struct {
	Host  string
	Name  string
	Owner string
}

Repository holds information representing a GitHub repository.

func Current

func Current() (Repository, error)

Current uses git remotes to determine the GitHub repository the current directory is tracking.

func Parse

func Parse(s string) (Repository, error)

Parse extracts the repository information from the following string formats: "OWNER/REPO", "HOST/OWNER/REPO", and a full URL. If the format does not specify a host, use the config to determine a host.

func ParseWithHost

func ParseWithHost(s, host string) (Repository, error)

ParseWithHost extracts the repository information from the following string formats: "OWNER/REPO", "HOST/OWNER/REPO", and a full URL. If the format does not specify a host, use the host provided.

Jump to

Keyboard shortcuts

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