linkStyle

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SupportedStyles

func SupportedStyles() string

SupportedStyles returns a printable string of supported styles.

Types

type Style

type Style string

Style is type for generating issue and commit links

const (
	// Github is for github links
	Github Style = "github"
	// Gitlab is for gitlab links
	Gitlab Style = "gitlab"
	// Stash is for stash links
	Stash Style = "stash"
	// Bitbucket is for bitbucket links
	Bitbucket Style = "bitbucket"
	// Cgit is for cgit links
	Cgit Style = "cgit"
)

func InferStyle

func InferStyle(repoURL string) Style

InferStyle tries to guess which style to use based on a repository URL

func (s Style) CommitLink(hash, repo string) string

CommitLink returns an issue link for a given Style

func (s Style) IssueLink(issue, repo string) string

IssueLink returns an issue link for a given Style

Jump to

Keyboard shortcuts

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