addons

package
v0.0.3-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: ISC Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SubstituteArray

func SubstituteArray(body string, path string, env Env) (string, error)

func SubstituteFile

func SubstituteFile(file *minecraft.JsonFile, env Env) error

func SubstituteItem

func SubstituteItem(body string, path string, env Env) (string, error)

func SubstituteObject

func SubstituteObject(body string, path string, env Env) (string, error)

func SubstituteString

func SubstituteString(in string, env Env) (string, error)

Types

type Addon

type Addon struct {
	SourceDir string
	BuildDir  string
	Iterators map[string]Rows
	Paths     []string
}

func New

func New(source_dir, build_dir string) *Addon

func (*Addon) Build

func (addon *Addon) Build() error

func (*Addon) BuildWithIterators

func (addon *Addon) BuildWithIterators(
	name string,
	iterators []string,
	file *minecraft.JsonFile,
) error

func (*Addon) LoadFiles

func (addon *Addon) LoadFiles(name string) error

func (*Addon) LoadIterators

func (addon *Addon) LoadIterators() error

type Columns

type Columns []string

type Env

type Env struct {
	Iterators map[string][]string
	Variables map[string]gjson.Result
}

func NewEnv

func NewEnv() Env

type Rows

type Rows []Columns

Jump to

Keyboard shortcuts

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