Sphire Mantis' API Documentation
import "github.com/sphireinc/mantis/data"
Path enumerators File Directory
const (
Path int = iota
File
Directory
)
func Exists(path string, pathType int) (bool, error)
Exists determines whether a given Path, File, or Directory exists use constants:
Path int = iota
File
Directory
func GetEnvVariables() map[string]string
GetEnvVariables returns a map of all environment variables
func IsStringTrue(str string) bool
IsStringTrue determines if a string is boolean true/false
func MapHasKey[T comparable](item map[T]any, key T) bool
MapHasKey contains checks if a map[T any]string has a given key T
func MapToString(mapInterface interface{}) (string, error)
MapToString takes a map[any]any and returns it as a string
func QueryJSON(obj string, query string) (interface{}, error)
QueryJSON queries a json object for a given path
func UnmarshalFile(filename string) (interface{}, error)
UnmarshalFile loads and unmarshals either a JSON or YAML file
Generated by gomarkdoc