util

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorAndExit

func ErrorAndExit(msg string, params ...interface{})

ErrorAndExit writes the given message to stderr and exits the program.

func FindTerraformFiles

func FindTerraformFiles(basePath string, extensions *FileExtensions) ([]string, error)

FindTerraformFiles walks the current directory and finds files matching the defined terraform file extensions

Types

type FileExtensions

type FileExtensions map[string]interface{}

FileExtensions is warpper type to facilate simplified file extensions checking

func (*FileExtensions) AsCommaSeparatedString

func (f *FileExtensions) AsCommaSeparatedString() string

AsCommaSeparatedString returns all keys in the FileExtensions map in a comma separated string.

func (*FileExtensions) Contains

func (f *FileExtensions) Contains(extension string) bool

Contains searches the defined list of file extensions and checks if the provided extensions exists

Jump to

Keyboard shortcuts

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