utils

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 21, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbortCleanupIfError

func AbortCleanupIfError(err error, path string, message string, v ...interface{})

AbortCleanupIfError attempts to clean up the specified path in the configuration workspace, then runs AbortIfError

func AbortIfError

func AbortIfError(err error, message string, v ...interface{})

AbortIfError abort command if there is an error

func ContainsStr

func ContainsStr(elements *[]string, needle string) bool

ContainsStr tells whenever a list of strring contains a specific string

func FromJSON

func FromJSON(path string, v interface{}) (err error)

FromJSON unmarshal a json file to an inferface

func PathExists

func PathExists(path string) bool

PathExists tells if a path exists

func ToJSON

func ToJSON(path string, data interface{}) (err error)

ToJSON write data to a json file

Types

This section is empty.

Jump to

Keyboard shortcuts

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