Improve optional stuff, add preserve flag

This commit is contained in:
comp500
2019-06-16 23:09:40 +01:00
parent e3bf7afe33
commit dc9fd4689f
2 changed files with 9 additions and 3 deletions

View File

@@ -26,12 +26,13 @@ type Index struct {
// IndexFile is a file in the index
type IndexFile struct {
// Files are stored in relative forward-slash format to the index file
// Files are stored in forward-slash format relative to the index file
File string `toml:"file"`
Hash string `toml:"hash"`
HashFormat string `toml:"hash-format,omitempty"`
Alias string `toml:"alias,omitempty"`
MetaFile bool `toml:"metafile,omitempty"` // True when it is a .toml metadata file
Preserve bool `toml:"preserve,omitempty"` // Don't overwrite the file when updating
fileExistsTemp bool
}