Skip to content

v1.0.7

Latest

Choose a tag to compare

@c2pc c2pc released this 05 Mar 04:00
· 1 commit to main since this release

Replacer: UUID placeholder

You can now use a ___uuid___ placeholder in config values. It is replaced with a new UUID each time the replacer runs, which is handy for generating unique IDs, tokens, or instance identifiers in configs.

Deprecated keys and migration helpers

Migration logic is extended with “deprecated”-style keys so you can reshape config without losing old data:

  • _deprecated — copy a value from an old path into a key (e.g. move host into server.host).
  • _deprecated_expand — expand an old array into a list of objects using a template.
  • _deprecated_collapse — take an array of objects and collapse one field into a simple array.
  • _deprecated_concat — glue several fields (after the above steps) into one string with a template like {0}:{1}.
  • _deprecated_replace — force a key to take the new value and ignore the merged old one.

Order of steps is: merge → deprecated → expand → collapse → concat → replace, so you can combine them in one migration (e.g. rename/move with _deprecated, then glue with _deprecated_concat).

INI config support

INI files are now supported as a config format. The driver uses gopkg.in/ini.v1; all values are kept as strings. Use the ini:// scheme (e.g. ini:///path/to/config.ini) the same way you use json:// or yaml://. Migrations for INI should be INI files as well.