feat(config): add Scaffolding.Boards typed input with 6 defaults

This commit is contained in:
MDietermann
2026-04-14 14:08:54 +02:00
parent 698271a235
commit bbaa21a6bf
3 changed files with 46 additions and 0 deletions

View File

@@ -61,6 +61,16 @@ type RenodeConfig struct {
Platforms []RenodePlatform `yaml:"platforms"`
}
type Board struct {
Name string `yaml:"name"`
FQBN string `yaml:"fqbn"`
Template string `yaml:"template"`
}
type Scaffolding struct {
Boards []Board `yaml:"boards"`
}
// Config is the fully-resolved runtime configuration.
type Config struct {
Version int `yaml:"version"`
@@ -76,6 +86,7 @@ type Config struct {
ShellConfig ShellConfigSection `yaml:"shell_config"`
Neovim NeovimConfig `yaml:"neovim"`
Renode RenodeConfig `yaml:"renode"`
Scaffolding Scaffolding `yaml:"scaffolding"`
}
const currentVersion = 1
@@ -161,5 +172,8 @@ func merge(base, over Config) Config {
if over.Renode.WokwiVersion != "" || len(over.Renode.Platforms) > 0 {
out.Renode = over.Renode
}
if len(over.Scaffolding.Boards) > 0 {
out.Scaffolding = over.Scaffolding
}
return out
}