env

package
v4.0.8+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2019 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultReportsDir           = "reports"
	GaugeReportsDirEnvName      = "gauge_reports_dir" // directory where reports are generated by plugins
	OverwriteReportsEnvProperty = "overwrite_reports"
	UseNestedSpecs              = "use_nested_specs"
	SaveExecutionResult         = "save_execution_result"
)

Variables

View Source
var GetProjectRoot = func() string {
	projectRoot := os.Getenv(common.GaugeProjectRootEnv)
	if projectRoot == "" {
		fmt.Printf("Environment variable '%s' is not set. \n", common.GaugeProjectRootEnv)
		os.Exit(1)
	}
	return projectRoot
}
View Source
var PluginKillTimeout = func() int {
	e := os.Getenv(pluginKillTimeout)
	if e == "" {
		return 0
	}
	v, err := strconv.Atoi(e)
	if err != nil {
		return 0
	}
	return v / 1000
}

PluginKillTimeout returns the plugin_kill_timeout in seconds

Functions

func AddDefaultPropertiesToProject

func AddDefaultPropertiesToProject()

func CreateDirectory

func CreateDirectory(dir string)

CreateDirectory creates given directory if it doesn't exist

func GetCurrentExecutableDir

func GetCurrentExecutableDir() (string, string)

func ShouldOverwriteReports

func ShouldOverwriteReports() bool

func ShouldUseNestedSpecs

func ShouldUseNestedSpecs() bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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