repo

package
v4.4.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	User   string
	Name   string
	Path   string
	Target string
}

Info contains basic information about repository

func ParsePath

func ParsePath(path string) (*Info, error)

ParsePath parses given path to repo struct

func (*Info) FullPath

func (i *Info) FullPath() string

FullPath returns full path e.g. user/project.target/some/part

func (*Info) GitHubRoot

func (i *Info) GitHubRoot() string

GitHubRoot returns GitHub root path e.g. github.com/user/project

func (*Info) GitHubURL

func (i *Info) GitHubURL(branchOrName string) string

GitHubURL returns URL of repository on github

func (*Info) GoDevURL

func (i *Info) GoDevURL(path, branchOrName string) string

GoDevURL returns URL of pkg.go.dev page with package documentation

func (*Info) Root

func (i *Info) Root() string

Root returns root path for some repo e.g. user/project.target

Jump to

Keyboard shortcuts

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