cmd

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2022 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFileExists      error = errors.New("extension has already been downloaded")
	ErrVersionNotFound error = errors.New("could not find version at Marketplace")
	ErrOutDirNotFound  error = errors.New("output dir does not exist")
)

Functions

func EnvOrArg

func EnvOrArg(env string, args []string, idx int) string

func EnvOrFlag

func EnvOrFlag(env, flag string) string

func EnvOrFlagBool

func EnvOrFlagBool(env string, flag bool) bool

func Execute

func Execute(version string)

Execute TODO

Types

type ExtensionRequest

type ExtensionRequest struct {
	UniqueID string
	Version  string
}

func NewFromFile

func NewFromFile(p string) ([]ExtensionRequest, error)

NewFromFile will walk the given path in search of text files that contain valid extension request definitions.

func (ExtensionRequest) Download

func (pe ExtensionRequest) Download(root string) (bool, error)

Download will fetch the extension all its assets making it ready to be served by the serve command. It returns true if a download occured and false if the requested version already exists at output.

func (ExtensionRequest) DownloadVSIXPackage

func (pe ExtensionRequest) DownloadVSIXPackage(root string) error

rewrite this, half the code is the same as Download, recursive function complicates things, maybe rethink the entire setup?

func (ExtensionRequest) String

func (pe ExtensionRequest) String() string

Jump to

Keyboard shortcuts

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