utils

package
v0.82.1 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package utils contains uniility functions utilised by Qaz

Index

Constants

This section is empty.

Variables

This section is empty.

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

func Zip added in v0.82.1

func Zip(dir string) (b bytes.Buffer, err error)

Zip -

Types

This section is empty.

Jump to

Keyboard shortcuts

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