Omit mode when empty (equivalent to mode "url")

This commit is contained in:
comp500 2022-06-07 03:23:41 +01:00
parent d34728f347
commit 72fbc68256

View File

@ -32,8 +32,8 @@ type ModDownload struct {
URL string `toml:"url,omitempty"` URL string `toml:"url,omitempty"`
HashFormat string `toml:"hash-format"` HashFormat string `toml:"hash-format"`
Hash string `toml:"hash"` Hash string `toml:"hash"`
// Mode defaults to modeURL (i.e. use URL) // Mode defaults to modeURL (i.e. use URL when omitted or empty)
Mode string `toml:"mode"` Mode string `toml:"mode,omitempty"`
} }
// ModOption specifies optional metadata for this mod file // ModOption specifies optional metadata for this mod file