glowstone

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertImageOpacity

func ConvertImageOpacity(filePath string, outPath string, alphaValue uint8) error

ConvertImageOpacity converts an image to specified alpha.

Example:

// Convert image to 10 alpha
ConvertImageOpacity("image.png", "image_new.png" 10)

func Copyfile

func Copyfile(source, destination string) error

func GetEggColor

func GetEggColor(filePath string) (string, string, error)

GetEggColor returns the primary and secondary color for a spawn egg.

Example:

// Get egg color
primary, secondary, err := GetEggColor("image.png")

func LoadJSON

func LoadJSON(path string, e interface{}) error

func Loadlang

func Loadlang(path string) (map[string]string, error)

func Makedir

func Makedir(path string) error

func MarshalJSON

func MarshalJSON(e interface{}, minify ...bool) ([]byte, error)

func TitleCase

func TitleCase(input string) string

func UnmarshalJSON added in v0.0.8

func UnmarshalJSON(data []byte, e interface{}) error

func Walk

func Walk(rootDir string) ([]string, error)

Walk walks the file tree rooted at rootDir, calling walkFn for each file or directory in the tree, including rootDir. All errors that arise visiting files and directories are filtered by walkFn. The files are walked in lexical order, which makes the output deterministic but means that for very large directories Walk can be inefficient. Walk does not follow symbolic links.

func WriteFile added in v0.0.11

func WriteFile(path string, b []byte) error

func WriteJSON added in v0.0.11

func WriteJSON(path string, data interface{}) error

func Writelang

func Writelang(path string, data map[string]string) error

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