teoconf

package
v0.0.0-...-2e4d9bc Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2021 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package teoconf is the Teonet file in json format config reader.

Index

Constants

This section is empty.

Variables

View Source
var MODULE = teokeys.Color(teokeys.ANSICyan, "(teoconf)")

MODULE is this package module name

Functions

This section is empty.

Types

type Config

type Config interface {
	// Value return pointer to input interface
	Value() interface{}

	// Default return default value in json string or directly set default
	// values inside Struct with data
	Default() []byte

	// Name return configuration name - file name or(and) key name when this packet
	// used inside teocdbcli/conf packet
	Name() string

	// Dir return configuration files folder
	Dir() string
}

Config is an configration data interface

type Teoconf

type Teoconf struct {
	Config
}

Teoconf is a config methods receiver

func New

func New(val Config) (c *Teoconf)

New create and initialize teonet config

func (*Teoconf) Read

func (c *Teoconf) Read() (err error)

Read reads parameters from config file and replace current parameters.

func (*Teoconf) Write

func (c *Teoconf) Write() (err error)

Write writes game parameters to config file.

Jump to

Keyboard shortcuts

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