Documentation
¶
Index ¶
Constants ¶
View Source
const ParserFormat string = "YAML"
ParserFormat defines the standard identifier and file extension target for this provider.
View Source
const XERR_PKGCTX_PARSER xerrors.ErrorCode = "XCONFIG.PARSER.YAML"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser implements the xconfig.Parser interface to read, parse, and merge data from structured YAML configuration files.
func NewParser ¶
func NewParser() *Parser
NewParser instantiates an unconfigured pointer to a YAML Parser.
func (*Parser) Read ¶
Read processes all matched YAML configuration files, loads their byte content into memory, and unmarshals the content syntax into a single consolidated generic map workspace.
Key behaviors:
- Loops through every identified path and aggregates properties into a shared map object.
- Bypasses empty text streams securely using a continue directive to evaluate adjacent file configurations.
- Note: The file scanner relies strictly on the "YAML" token extension layout. Ensure target files match this literal specification exactly (e.g., config.yaml).
Returns a merged generic map of configurations, or an error if any file read or decoding routine fails.
Click to show internal directories.
Click to hide internal directories.