Skip to content

Commit f73ea4d

Browse files
authored
Merge pull request #58 from NextronSystems/fix/make-file-fields-omitempty
fix: make file fields omitempty
2 parents 494c219 + 677e25e commit f73ea4d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

thorlog/v3/file.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ type File struct {
2424
FileMode FileModeType `json:"-" textlog:"-"`
2525

2626
// MagicHeader is the magic header of the file (e.g. PE, ZIP, etc.)
27-
MagicHeader string `json:"magic_header" textlog:"type,omitempty"`
27+
MagicHeader string `json:"magic_header,omitempty" textlog:"type,omitempty"`
2828

2929
// FileHashes contains the MD5, SHA1, and SHA256 hashes of the file, provided that the file is regular and could be read
3030
Hashes *FileHashes `json:"hashes,omitempty" textlog:",expand,omitempty"`
@@ -35,10 +35,10 @@ type File struct {
3535
// Filetimes contains the file times of the file (e.g. created, modified, accessed, etc.)
3636
Filetimes *Filetimes `json:"file_times,omitempty" textlog:",expand,omitempty"`
3737

38-
Size uint64 `json:"size" textlog:"size,omitempty"`
38+
Size uint64 `json:"size,omitempty" textlog:"size,omitempty"`
3939

4040
// Permissions contains the permissions of the file. This can be either Unix or Windows permissions.
41-
Permissions Permissions `json:"permissions" textlog:",expand,omitempty"`
41+
Permissions Permissions `json:"permissions,omitempty" textlog:",expand,omitempty"`
4242

4343
// PeInfo contains information about the PE file, if the file is a PE file
4444
PeInfo *PeInfo `json:"pe_info,omitempty" textlog:",expand,omitempty"`

0 commit comments

Comments
 (0)