properties

package
v0.9.13 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: MIT Imports: 4 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Table

type Table interface {
	Mode() safe.Mode

	Names() []string

	GetProperty(name string) string
	GetPropertyRequired(name string) (string, error)
	GetPropertyOptional(name string, defaultValue string) string

	SetProperty(name string, value string)

	Export(dst map[string]string) map[string]string

	Import(src map[string]string)
}

Table 表示一个属性的集合

func LoadFromResource added in v0.9.8

func LoadFromResource(path string, res resources.Table, mode safe.Mode) (Table, error)

LoadFromResource 从资源中加载属性表

func NewTable

func NewTable(mode safe.Mode) Table

NewTable 新建属性表

func Parse

func Parse(str string, mode safe.Mode) (Table, error)

Parse 解析属性表

Jump to

Keyboard shortcuts

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