config

package
v0.0.0-...-b478de6 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Example
package main

import (
	"fmt"

	"github.com/palantir/checks/gocd/config"
)

func main() {
	yml := `
root-dirs:
  - anotherDir/pkg
  - pkg
`
	cfg, err := config.LoadFromYML(yml)
	if err != nil {
		panic(err)
	}
	fmt.Printf("%q", fmt.Sprintf("%+v", cfg))
}
Output:

"{RootDirs:[anotherDir/pkg pkg]}"

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(configPath, _ string) (gocd.Params, error)

Types

type GoCD

type GoCD struct {
	RootDirs []string `yaml:"root-dirs"`
}

func LoadFromYML

func LoadFromYML(yml string) (GoCD, error)

func (*GoCD) ToParams

func (r *GoCD) ToParams() gocd.Params

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳