utils

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbsPathWithExpansion added in v0.6.0

func AbsPathWithExpansion(p string) (string, error)

AbsPathWithExpansion expand path beginning with "~/" to absolute path

func ArgToIndex added in v0.6.0

func ArgToIndex(arg string) (int64, error)

ArgToIndex take issue/pull index as string and return int64

func Contains added in v0.7.0

func Contains(haystack []string, needle string) bool

Contains checks containment

func DirExists added in v0.7.0

func DirExists(path string) (bool, error)

DirExists returns whether the given file exists or not

func FileExist added in v0.6.0

func FileExist(fileName string) (bool, error)

FileExist returns whether the given file exists or not

func GetOwnerAndRepo added in v0.6.0

func GetOwnerAndRepo(repoPath, user string) (string, string)

GetOwnerAndRepo return repoOwner and repoName based on relative path and default owner (if not in path)

func IndexOf added in v0.7.0

func IndexOf(haystack []string, needle string) int

IndexOf returns the index of first occurrence of needle in haystack

func NormalizeURL added in v0.6.0

func NormalizeURL(raw string) (*url.URL, error)

NormalizeURL normalizes the input with a protocol

func PathExists added in v0.5.0

func PathExists(path string) (bool, error)

PathExists returns whether the given file or directory exists or not

Types

This section is empty.

Jump to

Keyboard shortcuts

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