gogetter

package
v0.51.2 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsGoGettable

func IsGoGettable(path string) bool

func IsShipYaml added in v0.23.0

func IsShipYaml(path string) bool

func UntreeGithub

func UntreeGithub(path string) (string, string, bool)

if this path is a github path of the form `github.com/OWNER/REPO/tree/REF/SUBDIR` or `github.com/OWNER/REPO/SUBDIR`, change it to the go-getter form of `github.com/OWNER/REPO?ref=REF//` with a default ref of master and return a subdir of SUBDIR otherwise return the unmodified path the final param is whether the github URL is a blob (and thus a single file)

Types

type GoGetter

type GoGetter struct {
	Logger       log.Logger
	FS           afero.Afero
	Subdir       string
	IsSingleFile bool
}

func (*GoGetter) GetFiles

func (g *GoGetter) GetFiles(ctx context.Context, upstream, savePath string) (string, error)

TODO figure out how to copy files from host into afero filesystem for testing, or how to force go-getter to fetch into afero

Jump to

Keyboard shortcuts

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