repository

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: MIT Imports: 5 Imported by: 26

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 interface {
	Host() string
	Name() string
	Owner() string
}

Repository is the interface that wraps repository information methods.

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 added in v0.1.0

func ParseWithHost(s, host 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 host provided.

Jump to

Keyboard shortcuts

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