utils

package
v0.81.3-beta Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Log defines logger

Functions

func All

func All(a []string, s string) bool

All - returns true if all items in array the same as the given string

func ConfigTemplate

func ConfigTemplate(project string, region string) []byte

ConfigTemplate - Returns template byte string for init() function

func Get

func Get(url string) (string, error)

Get - HTTP Get request of given url and returns string

func GetInput

func GetInput(request string, def string) string

GetInput - reads input from stdin - request & default (if no input)

func GetSource

func GetSource(src string) (string, string, error)

GetSource - Checks if arg is url or file and returns stack name and filepath/url

func HandleError

func HandleError(err error)

HandleError - exits on error

func IsHCL

func IsHCL(s string) bool

IsHCL - returns true if s is a string in valid hcl format

func IsJSON

func IsJSON(s string) bool

IsJSON - returns true if s is a string in valid json format

func StringIn

func StringIn(s string, a []string) bool

StringIn - returns true if string in array

Types

This section is empty.

Jump to

Keyboard shortcuts

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