Documentation ¶
Index ¶
- Constants
- func Capitalize(s string) string
- func CopyDir(source string, dest string) (err error)
- func CopyFile(source string, dest string) (err error)
- func CopyRemoteFile(sourceURL string, dest string) (err error)
- func CreateFileFromString(filePath string, data string) error
- func CreateFileFromTemplate(basePath string, fileName string, template string, data interface{}) error
- func DeleteFilesWithPrefix(dir string, filePrefix string) int
- func ExecutableExists(execName string) bool
- func FileExists(filePath string) bool
- func IsGbProject(basePath string) bool
- func IsRemote(path string) bool
- func IsStringInList(str string, list []string) bool
- func LoadLocalFile(path string) (string, error)
- func LoadRemoteFile(sourceURL string) (string, error)
- func MoveFiles(source string, dest string) (err error)
- func PathToFileURL(filePath string) (string, error)
- func RenderTemplate(w io.Writer, text string, data interface{})
- func ReplaceEnvValue(env []string, envKey string, newValue string) []string
- func ToAbsOsPath(filePath string) (string, error)
- func URLToFilePath(fileURL *url.URL) (string, bool)
- func WriteJSONtoFile(filePath string, data interface{}) error
- type Gb
- func (e *Gb) Build() error
- func (e *Gb) Init(createBin bool)
- func (e *Gb) Installed() bool
- func (e *Gb) NewBinFilePath(fileName string) string
- func (e *Gb) VendorDelete(path string) error
- func (e *Gb) VendorDeleteSilent(path string) error
- func (e *Gb) VendorFetch(path string, version string) error
- func (e *Gb) VendorFetchWithBranch(path string, version string, branch string) error
- type PathInfo
Constants ¶
const FileURIPrefix = "file://"
Variables ¶
This section is empty.
Functions ¶
func Capitalize ¶
Capitalize will return a copy of the provided string with the first letter capitalized
func CopyRemoteFile ¶
func CreateFileFromString ¶
func CreateFileFromTemplate ¶
func DeleteFilesWithPrefix ¶
func ExecutableExists ¶
ExecutableExists checks if the specified executable exists in the users PATH
func FileExists ¶
FileExists determines if the named file exists
func IsGbProject ¶
func IsStringInList ¶
IsStringInList determines if the specified value is in the provided string list
func LoadLocalFile ¶
func LoadRemoteFile ¶
func PathToFileURL ¶
func RenderTemplate ¶
RenderTemplate renders the specified template
func ReplaceEnvValue ¶ added in v0.5.6
func ToAbsOsPath ¶
func URLToFilePath ¶
ToFilePath convert fileURL to file path
func WriteJSONtoFile ¶
WriteJSONtoFile encodes the data to json and saves it to a file
Types ¶
type Gb ¶
Gb structure that contains gb project paths
func (*Gb) NewBinFilePath ¶
NewBinFilePath creates a new file Path in the bin directory
func (*Gb) VendorDelete ¶
VendorDelete performs a 'gb vendor delete'
func (*Gb) VendorDeleteSilent ¶
VendorDeleteSilent performs a 'gb vendor delete' silently
func (*Gb) VendorFetch ¶
VendorFetch performs a 'gb vendor fetch'