utils

package
v0.0.0-...-d54391f Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConsoleOutput

func ConsoleOutput(message string)

ConsoleOutput writes to stdout.

func Contains

func Contains(array []string, element string) bool

Contains checks if there is a string already in an existing splice of strings

func FindInSlice

func FindInSlice(slice []string, val string) (int, bool)

FindInSlice returns index greater than -1 and true if item is found Code from https://golangcode.com/check-if-element-exists-in-slice/

func GetBytesInTiB

func GetBytesInTiB(size uint64) uint32

GetBytesInTiB converts a value from bytes to tebibytes (TiB)

func GetPassword

func GetPassword(prompt string) string

GetPassword gets a password

func GetTiBInBytes

func GetTiBInBytes(size uint32) uint64

GetTiBInBytes converts a value from tebibytes (TiB) to bytes

func PrintHeader

func PrintHeader(header string)

PrintHeader prints a header message

func ReadAzureBasicInfoJSON

func ReadAzureBasicInfoJSON(path string) (*models.AzureBasicInfo, error)

ReadAzureBasicInfoJSON reads the Azure Authentication json file json file and unmarshals it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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