shared_export_library

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanFilename

func CleanFilename(filename string) string

cleanFilename sanitizes the filename by replacing illegal characters with underscores.

func ConvertStructToMap

func ConvertStructToMap(data interface{}) map[string]interface{}

ConvertStructToMap converts a struct to a map[string]interface{}, removing "omitempty" tags from JSON field tags.

func RemoveKeys

func RemoveKeys(data map[string]interface{}) map[string]interface{}

RemoveKeys removes specific intune data keys from a map.

func SaveAsJSON

func SaveAsJSON(filePath string, data interface{}) error

saveAsJSON saves data in JSON format.

func SaveAsYAML

func SaveAsYAML(filePath string, data interface{}) error

saveAsYAML saves data in YAML format.

func SaveOutput

func SaveOutput(format, path, filename string, data interface{}) error

saveOutput saves the configuration data in the specified format.

func SaveScript

func SaveScript(basePath, filename, scriptType, base64Content string) error

saveScript decodes base64 script content and saves it to a file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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