files

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: MIT Imports: 13 Imported by: 1

Documentation

Index

Constants

View Source
const (
	StartIdentifier  uint8  = '<'
	EndIdentifier    uint8  = '>'
	EmptyIdentifier  string = ""
	InPlaceholder    bool   = true
	NotInPlaceholder bool   = false
	TimeFormat       string = "2006-01-02 15:04:05"
)
View Source
const (
	DeclarationSeparator = "="
)
View Source
const (
	DefaultFilePermissions os.FileMode = 0755
)

Variables

This section is empty.

Functions

func MapDataToTemplate

func MapDataToTemplate(raw []byte, match map[string]string) []byte

func PathSeparator

func PathSeparator() string

func WorkingDirectory

func WorkingDirectory() string

Types

type Environment

type Environment struct {
	// contains filtered or unexported fields
}

func NewEnvironment

func NewEnvironment() (env *Environment)

func (*Environment) GetEnvBool

func (environment *Environment) GetEnvBool(identifier string) (bool, bool)

GetEnvBool returns (value, found)

func (*Environment) GetEnvFloat

func (environment *Environment) GetEnvFloat(identifier string) (float64, bool)

GetEnvFloat returns (value, found)

func (*Environment) GetEnvInt

func (environment *Environment) GetEnvInt(identifier string) (int, bool)

GetEnvInt returns (value, found)

func (*Environment) GetEnvString

func (environment *Environment) GetEnvString(identifier string) (string, bool)

GetEnvString returns (value, found)

func (*Environment) LoadVariables

func (environment *Environment) LoadVariables(path ...string)

type Path

type Path struct {
	// contains filtered or unexported fields
}

func EmptyPath

func EmptyPath() Path

func (Path) BackDir

func (path Path) BackDir() Path

func (Path) Create

func (path Path) Create() (*os.File, error)

func (Path) Dir

func (path Path) Dir(directory string) Path

func (Path) DoesNotExist

func (path Path) DoesNotExist() bool

func (Path) Exists

func (path Path) Exists() bool

func (Path) File

func (path Path) File(file string) Path

func (Path) IsDirectory

func (path Path) IsDirectory() bool

func (Path) IsFile

func (path Path) IsFile() bool

func (Path) MkDir

func (path Path) MkDir() error

func (Path) Read

func (path Path) Read() ([]byte, error)

func (Path) Remove

func (path Path) Remove() error

func (Path) ToString

func (path Path) ToString() string

func (Path) Write

func (path Path) Write(bytes []byte) error

type PathType

type PathType uint8
const (
	FilePath      PathType = 0
	DirectoryPath          = 1
)

Jump to

Keyboard shortcuts

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