summaryrefslogtreecommitdiff
path: root/go.sum
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2024-10-08 17:04:30 +0200
committerxengineering <me@xengineering.eu>2024-10-08 17:04:30 +0200
commit2e326d354a536ec8626809c9fe9b411d05e79c46 (patch)
tree0f4415c6786635c8eee141e411520555ec0d0752 /go.sum
parentb03cf32bef7e34c4886a3b7300ffc0132b310a5b (diff)
downloadsoundbox-app-2e326d354a536ec8626809c9fe9b411d05e79c46.tar
soundbox-app-2e326d354a536ec8626809c9fe9b411d05e79c46.tar.zst
soundbox-app-2e326d354a536ec8626809c9fe9b411d05e79c46.zip
Use only one Config struct
This commit switches from a GlobalConfig struct with named sub-structs to a single struct definition with anonymous sub-structs. The advantage is that there are not so many names the reader has to understand. A custom UnmarshalJSON() function on the Config struct level ensures that the error checking can be embedded into the parsing process and native Go types like net.HardwareAddr can be used in the struct definition while the string-based struct for JSON unmarshaling is an implementation detail of the custom UnmarshalJSON() function. In general the user of this type and its method only has to parse the config with json.Unmarshal(), handle error at this step and can rely on validated configuration data with native Go types from that point on.
Diffstat (limited to 'go.sum')
0 files changed, 0 insertions, 0 deletions