ffo

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package ffo helps with file and folder operations

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExploreFolder

func ExploreFolder(path string) (err error)

ExploreFolder list folder childs and their type

func GetChild

func GetChild(basePath string, relativeFolderPath string) (childRelativePaths []string, err error)

GetChild returns the list to relative subfolders path for a folder + a relative path, crashes execution on errors

func JSONMarshalIndentPrint

func JSONMarshalIndentPrint(v interface{})

JSONMarshalIndentPrint marshal with 4 spaces indent no prefix and fmt print

func MarshalYAMLWrite

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

MarshalYAMLWrite Marshal an interface to YAML format and write the bytes to a given path

func ReadUnmarshalYAML

func ReadUnmarshalYAML(path string, settings interface{}) (err error)

ReadUnmarshalYAML Read bytes from a given path and unmarshal assuming YAML format

func ReadValidate

func ReadValidate(serviceName, settingsType, path string, settings interface{}) (err error)

ReadValidate reads a YAML config file to a struct and validate the struct

func YAMLMarshalPrint added in v0.4.0

func YAMLMarshalPrint(v interface{})

YAMLMarshalPrint marshal fmt print

func ZipSource

func ZipSource(zipFullPath string, zipFiles map[string]string) (err error)

ZipSource make a zip file from a map where the key is the file name and the value the string file content

Types

This section is empty.

Jump to

Keyboard shortcuts

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