fileutil

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2021 License: Apache-2.0 Imports: 4 Imported by: 5

Documentation

Overview

Package fileutil provides utilities for file operations

Index

Constants

View Source
const (
	// FileSource specifies to load config from a file
	FileSource = "file://"
	// EnvSource specifies to load config from an environment variable
	EnvSource = "env://"
)

Variables

This section is empty.

Functions

func FileExists

func FileExists(file string) error

FileExists ensures that file exists

func FolderExists

func FolderExists(dir string) error

FolderExists ensures that folder exists

func LoadConfigWithSchema

func LoadConfigWithSchema(config string) (string, error)

LoadConfigWithSchema returns a configuration loaded from file:// or env:// If config does not start with file:// or env://, then the value is returned as is

func SaveConfigWithSchema

func SaveConfigWithSchema(path, value string) error

SaveConfigWithSchema saves configuration to file:// or env://

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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