metaflag

package
v0.0.0-...-b8f7586 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2015 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package metaflag sets command-line flags according to the metadata specified in a Google Compute Engine instance creation request.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

Init looks up each registered command-line flag in the Google Compute Engine instance metadata server to see if a value was specified in the instance creation request. If so, Init sets the flag to that value.

For example, if the instance request said --metadata x=y and there is a flag named x, metaflag.Init causes the flag x to be set to y.

The expected use is:

metadata.Init()
flag.Parse()

to allow the instance creation request to set default flag values but still allow the command line to override those.

Types

This section is empty.

Jump to

Keyboard shortcuts

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