str

package
v0.1.44 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dedupe

func Dedupe(values []string, keyGetter ...StringKeyGetter) []string

Dedupe de-duplicates the provided :values slice and returns the de-duplicated slice

func GetHttpCloneUrlFromHttpLink(httpLinkUrl string) (string, error)

GetHttpCloneUrlFromHttpLink returns the Git HTTP clone URL given a HTTP link URL, for example if the repository link is https://github.com/zephinzer/dev, the returned clone URL will be https://github.com/zephinzer/dev.git

func GetHttpLinkFromHttpCloneUrl

func GetHttpLinkFromHttpCloneUrl(httpCloneUrl string) (string, error)

func GetHttpLinkFromSshCloneUrl

func GetHttpLinkFromSshCloneUrl(sshCloneUrl string) (string, error)

func GetSshCloneUrlFromHttpLinkUrl

func GetSshCloneUrlFromHttpLinkUrl(httpLinkUrl string) (string, error)

GetSshCloneUrlFromHttpLinkUrl returns the Git SSH clone URL given a HTTP link URL, for example if the repository link is https://github.com/zephinzer/dev, the returned clone URL will be [email protected]:zephinzer/dev.git

func IsEmpty

func IsEmpty(test string) bool

Types

type StringKeyGetter

type StringKeyGetter func(string) string

StringKeyGetter is the signature for a function used in .Dedupe

Jump to

Keyboard shortcuts

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