cbtrc

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2016 License: Apache-2.0, Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package cbtrc encapsulates common code for reading .cbtrc files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filename

func Filename() string

Filename returns the filename consulted for standard configuration.

Types

type Config

type Config struct {
	Project, Zone, Cluster string // required
	Creds                  string // optional
}

Config represents a configuration.

func Load

func Load() (*Config, error)

Load loads a .cbtrc file. If the file is not present, an empty config is returned.

func (*Config) CheckFlags

func (c *Config) CheckFlags() error

CheckFlags checks that the required config values are set.

func (*Config) RegisterFlags

func (c *Config) RegisterFlags()

RegisterFlags registers a set of standard flags for this config. It should be called before flag.Parse.

Jump to

Keyboard shortcuts

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