config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Data structure for storing data from Refractong engine configuration files (.con)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Path string
	// contains filtered or unexported fields
}

func FromBytes

func FromBytes(path string, data []byte) *Config

func New

func New(path string, content map[string]Value) *Config

func (*Config) Delete

func (c *Config) Delete(key string)

func (*Config) GetValue

func (c *Config) GetValue(key string) (Value, error)

func (*Config) HasKey added in v0.1.4

func (c *Config) HasKey(key string) bool

func (*Config) SetValue

func (c *Config) SetValue(key string, value Value)

func (*Config) ToBytes added in v0.1.0

func (c *Config) ToBytes() []byte

type ErrNoSuchKey

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

func (*ErrNoSuchKey) Error

func (e *ErrNoSuchKey) Error() string

type Value

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

func NewQuotedValue added in v0.1.0

func NewQuotedValue(content string) *Value

func NewQuotedValueFromSlice added in v0.1.0

func NewQuotedValueFromSlice(content []string) *Value

func NewValue

func NewValue(content string) *Value

func NewValueFromSlice added in v0.1.0

func NewValueFromSlice(content []string) *Value

func (*Value) Slice

func (v *Value) Slice() []string

func (*Value) String

func (v *Value) String() string

Jump to

Keyboard shortcuts

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