config

package
v0.0.0-...-862138a Latest Latest
Warning

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

Go to latest
Published: May 29, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Example
package main

import (
	"fmt"

	"github.com/palantir/godel/apps/gunit/config"
)

func main() {
	yml := `
tags:
  integration:
    names:
      - "integration_tests"
    paths:
      - "test"
    exclude:
      names:
        - "ignore"
      paths:
        - "test/exclude"
`
	cfg, err := config.LoadRawConfig(yml, "")
	if err != nil {
		panic(err)
	}
	fmt.Printf("%q", fmt.Sprintf("%+v", cfg))
}
Output:

"{Tags:map[integration:{NamesPathsCfg:{Names:[integration_tests] Paths:[test]} Exclude:{Names:[ignore] Paths:[test/exclude]}}] Exclude:{Names:[] Paths:[]}}"

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(cfgPath, jsonContent string) (params.GUnit, error)

Types

type GUnit

type GUnit struct {
	// Tags group tests into different sets. The key is the name of the tag and the value is a
	// matcher.NamesPathsWithExcludeCfg that specifies the rules for matching the tests that are part of the tag.
	// Any test that matches the provided matcher is considered part of the tag.
	Tags map[string]matcher.NamesPathsWithExcludeCfg `yaml:"tags" json:"tags"`

	// Exclude specifies the files that should be excluded from tests.
	Exclude matcher.NamesPathsCfg `yaml:"exclude" json:"exclude"`
}

func LoadRawConfig

func LoadRawConfig(ymlContent, jsonContent string) (GUnit, error)

func (*GUnit) ToParams

func (r *GUnit) ToParams() params.GUnit

Jump to

Keyboard shortcuts

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