package cbtrc

import "cloud.google.com/go/bigtable/internal/cbtrc"

Package cbtrc encapsulates common code for reading .cbtrc files.

Index

Functions

func Filename

func Filename() string

Filename returns the filename consulted for standard configuration.

Types

type Config

type Config struct {
	Project, Instance 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.

Source Files

cbtrc.go

Version
v0.4.0
Published
Nov 1, 2016
Platform
linux/amd64
Imports
8 packages
Last checked
15 seconds ago

Tools for package owners.