xmlio

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load[T any](path string, cfg *T) error

Load loads an XML configuration file from path into cfg.

cfg must be a pointer. The function performs a single XML decode from the file.

func Save

func Save[T any](path string, cfg T) error

Save writes cfg as XML to path.

Save is crash-safe:

  • data is written to a temporary file
  • the file is synced
  • the file is atomically renamed to the target path

The parent directory is created if it does not exist. Concurrent writes to the same path are not synchronized.

Types

This section is empty.

Jump to

Keyboard shortcuts

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