util

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2018 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BackupIfPresent

func BackupIfPresent(fs afero.Afero, basePath string, logger log.Logger, ui cli.Ui) error

func BailIfPresent

func BailIfPresent(fs afero.Afero, basePath string, logger log.Logger) error

BailIfPresent returns an error if the path is present. Handy to prevent accidentally blowing away directories on the workstation.

func FindOnlySubdir

func FindOnlySubdir(dir string, fs afero.Afero) (string, error)

FindOnlySubdir finds the only subdirectory of a directory.

func IsGithubURL

func IsGithubURL(url string) bool

returns true if this parses as a valid Github URL.

Types

type AssetUploader added in v0.16.0

type AssetUploader interface {
	UploadAssets(target string) error
}

func NewAssetUploader added in v0.16.0

func NewAssetUploader(
	logger log.Logger,
	client *http.Client,
) AssetUploader

type GithubURL

type GithubURL struct {
	Owner  string
	Repo   string
	Ref    string
	Subdir string
}

func ParseGithubURL

func ParseGithubURL(url string, defaultRef string) (GithubURL, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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