utils

package
v0.7.1-0...-009166e Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbsPathWithExpansion

func AbsPathWithExpansion(p string) (string, error)

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

func ArgToIndex

func ArgToIndex(arg string) (int64, error)

ArgToIndex take issue/pull index as string and return int64

func Contains

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

Contains checks containment

func DirExists

func DirExists(path string) (bool, error)

DirExists returns whether the given file exists or not

func FileExist

func FileExist(fileName string) (bool, error)

FileExist returns whether the given file exists or not

func GetOwnerAndRepo

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

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

IndexOf returns the index of first occurrence of needle in haystack

func NormalizeURL

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

NormalizeURL normalizes the input with a protocol

func PathExists

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