fileproc

package
v0.0.39 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetArray

func GetArray(i interface{}, value string) ([]interface{}, error)

GetArray Gets an array from an interface address

func GetBoolean

func GetBoolean(i interface{}, value string) (bool, error)

GetBoolean Gets an boolean value from an interface address

func GetFloat32

func GetFloat32(i interface{}, value string) (float32, error)

GetFloat32 Gets an float32 value from an interface address

func GetFloat64

func GetFloat64(i interface{}, value string) (float64, error)

GetFloat64 Gets an float64 value from an interface address

func GetInt

func GetInt(i interface{}, value string) (int, error)

GetInt Gets an int value from an interface address

func GetPropertyValue

func GetPropertyValue(i interface{}, value string) (interface{}, error)

GetPropertyValue Gets a property generic value

func GetString

func GetString(i interface{}, value string) (string, error)

GetString Gets an string value from an interface address

func Process

func Process(content []byte, variables ...Variable) []byte

Process Process a file replacing the variables in it

func ReplaceAll

func ReplaceAll(content []byte, variables ...Variable) []byte

ReplaceAll Replaces all variables in a string content

Types

type InlineVariable

type InlineVariable struct {
	Path  string
	Value string
}

InlineVariable Entity

func GetVariables

func GetVariables(content string) []InlineVariable

GetVariables Extract the variables from a file content

type Variable

type Variable struct {
	Name  string
	Value string
}

Variable Entity

Jump to

Keyboard shortcuts

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