package
1.88.1
Repository: https://github.com/cloudposse/atmos.git
Documentation: pkg.go.dev

# Functions

Coalesce returns the first non-empty argument.
ConvertEnvVars convert ENV vars from a map to a list of strings in the format ["key1=val1", "key2=val2", "key3=val3" ...].
ConvertFromJSON converts the provided JSON-encoded string to Go data types.
ConvertPathsToAbsolutePaths converts a slice of paths to a slice of absolute paths.
ConvertToHclAst converts the provided value to an HCL abstract syntax tree.
ConvertToJSON converts the provided value to a JSON-encoded string.
ConvertToJSONFast converts the provided value to a JSON-encoded string using 'ConfigFastest' config and json.Marshal without indents.
ConvertToYAML converts the provided data to a YAML string.
EnsureDir accepts a file path and creates all the intermediate subdirectories.
FileExists checks if the file exists and is not a directory.
FileOrDirExists checks if the file or directory exists.
GetAllFilesInDir returns all files in the provided directory and all subdirectories.
GetAllYamlFilesInDir returns all YAML files in the provided directory and all subdirectories.
GetGlobMatches tries to read and return the Glob matches content from the sync map if it exists in the map, otherwise it finds and returns all files matching the pattern, stores the files in the map and returns the files.
GetLatestGitHubRepoRelease returns the latest release tag for a GitHub repository.
IsDirectory checks if the path is a directory.
IsPathAbsolute checks if the provided file path is absolute.
IsSocket checks if a file is a socket.
IsYaml checks if the file has YAML extension (does not check file schema, nor validates the file).
JoinAbsolutePathWithPath checks if the provided path is absolute.
JoinAbsolutePathWithPaths joins a base path with each item in the path slice and returns a slice of absolute paths.
JSONToMapOfInterfaces takes a JSON string as input and returns a map[string]any.
LogDebug logs the provided debug message.
LogError logs errors to std.Error.
LogErrorAndExit logs errors to std.Error and exits with an error code.
LogInfo logs the provided info message.
LogTrace logs the provided trace message.
LogWarning logs the provided warning message.
MapKeyExists checks if a key already defined in a map.
PathMatch returns true if `name` matches the file name `pattern`.
PrintAsHcl prints the provided value as HCL (HashiCorp Language) document to the console.
PrintAsJSON prints the provided value as JSON document to the console.
PrintAsJSONToFileDescriptor prints the provided value as JSON document to a file descriptor.
PrintAsYAML prints the provided value as YAML document to the console.
PrintAsYAMLToFileDescriptor prints the provided value as YAML document to a file descriptor.
PrintMessage prints the message to the console.
PrintMessageInColor prints the message to the console using the provided color.
SliceContainsInt checks if an int is present in a slice.
SliceContainsString checks if a string is present in a slice.
SliceContainsStringHasPrefix checks if a slice contains a string that begins with the given prefix.
SliceContainsStringStartsWith checks if a slice contains a string that the given string begins with.
SliceOfInterfacesToSliceOdStrings converts a slice of any to a slice os strings.
SliceOfInterfacesToSliceOfStrings takes a slice of interfaces and converts it to a slice of strings.
SliceOfPathsContainsPath checks if a slice of file paths contains a path.
SliceOfStringsToSpaceSeparatedString checks if an int is present in a slice.
SortMapByKeysAndValuesUniq sorts the provided map by the keys, sorts the map values (lists of strings), and makes the values unique.
StringKeysFromMap returns a slice of sorted string keys from the provided map.
TrimBasePathFromPath trims the base path prefix from the path.
UniqueStrings returns a unique subset of the string slice provided.
UnmarshalYAML takes a YAML string as input and unmarshals it into a Go type.
WriteTerraformBackendConfigToFileAsHcl writes the provided Terraform backend config to the specified file https://dev.to/pdcommunity/write-terraform-files-in-go-with-hclwrite-2e1j https://pkg.go.dev/github.com/hashicorp/hcl/v2/hclwrite.
WriteToFileAsHcl converts the provided value to HCL (HashiCorp Language) and writes it to the specified file.
WriteToFileAsJSON converts the provided value to JSON and writes it to the specified file.
WriteToFileAsYAML converts the provided value to YAML and writes it to the specified file.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author