config

package
v0.0.0-...-b952f1b Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadJson

func ReadJson(file string, data interface{}) error

Types

type Config

type Config struct {
	TmpCategory TmpCategory
	// contains filtered or unexported fields
}

Config 配置

func NewConfig

func NewConfig(pathName string) (Config, error)

func (*Config) Load

func (c *Config) Load() error

func (*Config) NewTmpCategory

func (c *Config) NewTmpCategory() error

func (*Config) ReLoad

func (c *Config) ReLoad(files []string) error

type Tmp

type Tmp struct {
	Id    int               `json:"id"`    // id
	Count int               `json:"count"` // 数量
	Name  string            `json:"name"`  // 名字
	Num   float32           `json:"num"`   // 数量
	Ns    []int             `json:"ns"`    // aaa
	Nn    []string          `json:"nn"`    // addd
	M     map[string]int    `json:"m"`     // adsa
	Ms    map[string]string `json:"ms"`    // adsff
	B     bool              `json:"b"`     // 真假
}

type TmpCategory

type TmpCategory struct {
	// contains filtered or unexported fields
}

func NewTmpCategory

func NewTmpCategory(file string) (TmpCategory, error)

func (TmpCategory) Get

func (t TmpCategory) Get(id int) Tmp

func (TmpCategory) GetAll

func (t TmpCategory) GetAll() map[int]Tmp

Jump to

Keyboard shortcuts

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