util

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2018 License: Apache-2.0 Imports: 15 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 GenerateNameFromMetadata added in v0.25.0

func GenerateNameFromMetadata(k8sYaml state.MinimalK8sYaml, idx int) string

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
	IsBlob bool
}

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