Don't serialise empty author/version fields in pack.toml

This commit is contained in:
comp500 2021-01-08 01:17:27 +00:00
parent 877c7d1b02
commit b8887e6704

View File

@ -14,8 +14,8 @@ import (
// Pack stores the modpack metadata, usually in pack.toml // Pack stores the modpack metadata, usually in pack.toml
type Pack struct { type Pack struct {
Name string `toml:"name"` Name string `toml:"name"`
Author string `toml:"author"` Author string `toml:"author,omitempty"`
Version string `toml:"version"` Version string `toml:"version,omitempty"`
Index struct { Index struct {
// Path is stored in forward slash format relative to pack.toml // Path is stored in forward slash format relative to pack.toml
File string `toml:"file"` File string `toml:"file"`