utils

package
Version: v0.0.0-...-0d75033 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2018 License: Apache-2.0 Imports: 6 Imported by: 6

Documentation

Overview

Package utils provides a collection of nice flag/flagfile helpers without requiring someone to actually use flagfile.Load() over flag.Parse()

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Setup

func Setup(prefix string, x interface{})

Setup is meant to be called in init or in some other place prior to flagfile.Load() or flags.Parse(). Setup will take a struct and through reflect, create flags for all of the fields in the struct. The given prefix is added to all of the discovered flags. Setup doesn't return any value, but sets up the flag system to mutate the given struct when flag.Parse/flagfile.Load is called.

If a prefix is non-zero length, it is joined with a separating period.

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL