utils

package
v0.0.0-...-eabcf38 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EnableDebug bool = false

Functions

func AllDirsExist

func AllDirsExist(paths ...string) bool

func BaseDir

func BaseDir() string

func CommandExists

func CommandExists(command string) bool

func Debug

func Debug(f string, t ...interface{})

func Die

func Die(exitCode int, f string, t ...interface{})

Exits with exitCode after printing message. Automatically selects STDOUT vs STDERR depending on value of exitCode

func EnablePgid

func EnablePgid(cmd *exec.Cmd)

func Err

func Err(f string, t ...interface{})

func IsDir

func IsDir(name string) bool

func IsExist

func IsExist(path string) bool

func IsFile

func IsFile(name string) bool

func KillPgid

func KillPgid(cmd *exec.Cmd) error

func MkdirP

func MkdirP(paths ...string) error

func OpenUrlInBrowser

func OpenUrlInBrowser(url string)

func Out

func Out(f string, t ...interface{})

func RespondsWithSuccess

func RespondsWithSuccess(url string) bool

func TryConnect

func TryConnect(host string, port int) bool

func Unzip

func Unzip(src string, dest string) error

func WaitUntilPortAttached

func WaitUntilPortAttached(port int, message string)

func WaitUntilResponseSuccess

func WaitUntilResponseSuccess(url string, message string)

Types

type Java

type Java struct {
	Home string
	// contains filtered or unexported fields
}

Builds a `java` command invocation with a specific JAVA_HOME

func NewJava

func NewJava(javaHome string) *Java

func (*Java) Build

func (j *Java) Build(properties JavaProps, args ...string) *exec.Cmd

func (*Java) Executable

func (j *Java) Executable() string

func (*Java) Verify

func (j *Java) Verify() error

type JavaProps

type JavaProps map[string]string

func PropsFromYaml

func PropsFromYaml(yamlFile string) (JavaProps, error)

func (*JavaProps) Args

func (j *JavaProps) Args() []string

Jump to

Keyboard shortcuts

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