section_config

package
v1.6.5-rc45 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Decoder

type Decoder struct {
	Section
	Sep    byte
	Values map[string]string
}

func NewDecoder

func NewDecoder(sep byte) *Decoder

func (*Decoder) Unmarshal

func (d *Decoder) Unmarshal(c SectionConfig, data []byte) error

func (*Decoder) UnmarshalFromFile

func (d *Decoder) UnmarshalFromFile(v SectionConfig, path string) error

type Encoder

type Encoder struct {
	Sep    byte
	Values map[string]string
}

func NewEncoder

func NewEncoder(sep byte) *Encoder

func (*Encoder) Marshal

func (e *Encoder) Marshal(c SectionConfig) ([]byte, error)

func (*Encoder) MarshalToFile

func (e *Encoder) MarshalToFile(c SectionConfig, path string) error

type Section

type Section struct {
	Name  string
	Value string
}

func (Section) String

func (s Section) String() string

type SectionConfig

type SectionConfig interface {
	GetSection() *Section
	SetSection(string, string)
}

Jump to

Keyboard shortcuts

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