cliutils

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	InReader  io.Reader
	OutWriter io.Writer
	ErrWriter io.Writer
	// contains filtered or unexported fields
}

Config stores general setting params and provides accessors for them.

func NewConfig

func NewConfig(
	inReader io.Reader,
	outWriter io.Writer,
	errWriter io.Writer,
) *Config

NewConfig creates new Config object.

func (*Config) Init

func (c *Config) Init(cfgFile string) (err error)

Init initializes the config read from the file.

func (*Config) Name

func (c *Config) Name() (string, error)

Name returns the application name.

func (*Config) Version

func (c *Config) Version() (string, error)

Version returns the application version.

type TemplateString

type TemplateString string

TemplateString is a compilable string with text/template package

func (TemplateString) Compile

func (s TemplateString) Compile(v interface{}) (string, error)

Compile generates textual output applied a parsed template to the specified values

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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