utils

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: May 26, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// JoinPath is a utility variable that points to filepath.Join for constructing file paths in a platform-independent way.
	JoinPath = filepath.Join

	// WriteFile is a variable that points to os.WriteFile, used for writing data to a file, creating it if it doesn't exist.
	WriteFile = os.WriteFile

	// MkdirAll is a variable that points to os.MkdirAll, used for creating directories along with any necessary parents.
	MkdirAll = os.MkdirAll
)

Functions

func CreateFile

func CreateFile(
	path string,
	content string,
	entries ...ReplaceEntry,
)

Types

type ReplaceEntry

type ReplaceEntry struct {
	Key   string
	Value string
}

func Replacement

func Replacement(key string, value string) ReplaceEntry

Jump to

Keyboard shortcuts

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