util

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2022 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteEmptyFromStringSlice

func DeleteEmptyFromStringSlice(s []string) []string

DeleteEmptyFromStringSlice deletes empty items from string slice

func FileExists

func FileExists(path string) (bool, error)

FileExists checks if given file exists

func GetRepoNameFromRemoteURL

func GetRepoNameFromRemoteURL(remoteURL string) (string, error)

GetRepoNameFromRemoteURL parses standard bare repo git url and returns repo name

func GetSSHPublicKeyFromPrivateKeyFile

func GetSSHPublicKeyFromPrivateKeyFile(filePath string) (*ssh.PublicKeys, error)

GetSSHPublicKeyFromPrivateKeyFile retrives ssh public key from file

func IndentMultiline

func IndentMultiline(multilineStr string, indendationLevel int) string

IndentMultiline increases indentation of a multiline string

func MeasureDuration added in v1.12.0

func MeasureDuration(f func() error) (time.Duration, error)

func ReadAPIToString

func ReadAPIToString(url string) (string, error)

ReadAPIToString reads external HTTP.GET api to string

Types

This section is empty.

Jump to

Keyboard shortcuts

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