common

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// FeaturesDir is the name given to the features directory in a Kosher project
	FeaturesDir = "features"

	// ConfigDir is the name given to the config directory in a Kosher project
	ConfigDir = "config"

	// ResultsDir is the name given to the results directory where test results are written
	ResultsDir = "results"

	// ReportFile is the name given to the HTML report generated
	ReportFile = "report.html"

	// EnvironmentsFile is the name given to the environments file in a Kosher project
	EnvironmentsFile = "environments.json"

	// PagesFile is the name given to the pages file in a Kosher project
	PagesFile = "pages.json"

	// SelectorsFile is the name given to the selectors file in a Kosher project
	SelectorsFile = "selectors.json"

	// SettingsFile is the name given to the settings file in a Kosher project
	SettingsFile = "settings.json"

	// ExampleFeatureFile is the name given to the sample feature provided when a project is initialized
	ExampleFeatureFile = "example.feature"

	// DefaultScreenFormat is the default screen format
	DefaultScreenFormat = "desktop"

	// DefaultScreenWidth is the fail-safe screen width
	DefaultScreenWidth = 1024

	// DefaultScreenHeight is the fail-safe screen height
	DefaultScreenHeight = 768
)

Variables

View Source
var CurrentVersion = &Version{
	Major: 1,
	Minor: 0,
	Patch: 0,
}

CurrentVersion is the current version of Kosher; the one, true version number in this code base.

Functions

func FormatDate

func FormatDate(t time.Time, dateFormat string) string

FormatDate converts a `time.Time` to a string using the `dateFormat` value specified in the settings file

func ParseDate

func ParseDate(date string, dateFormat string) time.Time

ParseDate parses a given string to a `time.Time` using the `dateFormat` value specified in the settings file

Types

type Version

type Version struct {
	Major  int
	Minor  int
	Patch  int
	Suffix string
}

Version represents a fully qualified version number

func (*Version) Version

func (v *Version) Version() string

Version returns the version information in string form (e.g. 1.02.55)

Jump to

Keyboard shortcuts

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