utils

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: May 9, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const BODY_FORMAT_FLAT = `text`
View Source
const BODY_FORMAT_JSON = `json`
View Source
const BODY_FORMAT_YAML = `yaml`
View Source
const DEFAULT_PATH string = `/-`
View Source
const DEFAULT_PDP string = `http://localhost:17779`
View Source
const TAG_PATTERN string = `[a-zA-Z][a-zA-Z0-9]*([_-][a-zA-Z0-9]*)*`
View Source
const TEST_CASE_TITLE_PATTERN string = `[a-zA-Z][\\w\\-\\s.:;]*`
View Source
const TIME_RFC3339 string = `` /* 161-byte string literal not displayed */
View Source
const VERSION_PATTERN string = `[v]?((\\d+\\.)?(\\d+\\.)?(\\*|\\d+))`

Variables

View Source
var TEST_CASE_TITLE_REGEXP *regexp.Regexp = regexp.MustCompile(`^` + strings.ReplaceAll(TEST_CASE_TITLE_PATTERN, `\\`, `\`) + `$`)

Functions

func CombineErrors added in v1.0.3

func CombineErrors(label string, messages []string) error

func Contains added in v1.0.1

func Contains(vs []string, t string) bool

func ContainsInsensitiveCase added in v1.0.4

func ContainsInsensitiveCase(vs []string, t string) bool

func ContainsInt added in v1.0.4

func ContainsInt(vs []int, t int) bool

func DetectRelativePath added in v1.0.4

func DetectRelativePath(p string) (string, error)

func DetectRelativePaths added in v1.0.6

func DetectRelativePaths(p []string) []string

func Filter added in v1.0.1

func Filter(vs []string, f func(string, int) bool) []string

func FindUsername added in v1.0.4

func FindUsername() (string, error)

func FindWorkingDir

func FindWorkingDir() string

func Flatten added in v1.0.6

func Flatten(docName string, tree map[string]interface{}) (map[string]interface{}, error)

func Index added in v1.0.4

func Index(vs []string, t string) int

func IndexInt added in v1.0.1

func IndexInt(vs []int, t int) int

func IsDir

func IsDir(name string) bool

func Map added in v1.0.1

func Map(vs []string, f func(string, int) string) []string

func RefOfInt added in v1.0.4

func RefOfInt(val int) *int

func RefOfString added in v1.0.3

func RefOfString(val string) *string

func Split added in v1.0.1

func Split(str string, sep string) []string

func StandardizeVersion added in v1.0.3

func StandardizeVersion(version string) string

func UrlJoin

func UrlJoin(pdp string, basePath string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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