temoto / vender

Open source vending machine controller firmware
Creative Commons Zero v1.0 Universal
64 stars 20 forks source link

config: per-key default values / include overrides #7

Open temoto opened 4 years ago

temoto commented 4 years ago

As configs merging (include mechanic) is implemented right now, whole block will override parent block.

# vender.hcl
ui {
  front {
    msg_intro = "hello"
    msg_wait = "please wait"
  }
}
include "local.hcl" {}

# local.hcl
ui {
  front {
    msg_intro = "welcome"
  }
}

Yields config.UI.Front.MsgIntro="welcome" MsgWait=""

Should be config.UI.Front.MsgIntro="welcome" MsgWait="please wait"

Options to explore: hcl2, toml, lua.