...

Package javaproperties

import "github.com/spf13/viper/internal/encoding/javaproperties"
Overview
Index

Overview ▾

type Codec

Codec implements the encoding.Encoder and encoding.Decoder interfaces for Java properties encoding.

type Codec struct {
    KeyDelimiter string

    // Store read properties on the object so that we can write back in order with comments.
    // This will only be used if the configuration read is a properties file.
    // TODO: drop this feature in v2
    // TODO: make use of the global properties object optional
    Properties *properties.Properties
}

func (*Codec) Decode

func (c *Codec) Decode(b []byte, v map[string]any) error

func (*Codec) Encode

func (c *Codec) Encode(v map[string]any) ([]byte, error)