From 80bdce4262fa22702070e291d7845dfb18a5d19c Mon Sep 17 00:00:00 2001 From: Mike Cohen Date: Sun, 10 Nov 2024 19:02:12 +1000 Subject: [PATCH] Bugfix: JSON tags were incorrect (#99) --- .github/workflows/go.yml | 8 ++++---- parser/easy.go | 2 +- parser/fixtures/TestNTFS.golden | 6 ++++++ 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index b3fbbb9..625c399 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -7,14 +7,14 @@ jobs: runs-on: ubuntu-latest steps: - - name: Set up Go 1.19 - uses: actions/setup-go@v1 + - name: Set up Go + uses: actions/setup-go@v4 with: - go-version: 1.19 + go-version: '^1.23' id: go - name: Check out code into the Go module directory - uses: actions/checkout@v1 + uses: actions/checkout@v4 - name: Test run: | diff --git a/parser/easy.go b/parser/easy.go index d103c93..e7e93a4 100644 --- a/parser/easy.go +++ b/parser/easy.go @@ -31,7 +31,7 @@ type FileInfo struct { Ctime time.Time `json:"Ctime,omitempty"` Btime time.Time `json:"Btime,omitempty"` // Birth time. FNBtime time.Time `json:"FNBtime,omitempty"` - FNMtime time.Time `json:"FNBtime,omitempty"` + FNMtime time.Time `json:"FNMtime,omitempty"` Name string `json:"Name,omitempty"` NameType string `json:"NameType,omitempty"` ExtraNames []string `json:"ExtraNames,omitempty"` diff --git a/parser/fixtures/TestNTFS.golden b/parser/fixtures/TestNTFS.golden index ebcb140..eee5f1b 100644 --- a/parser/fixtures/TestNTFS.golden +++ b/parser/fixtures/TestNTFS.golden @@ -7,6 +7,8 @@ "Atime": "2018-09-24T07:56:35.3135567Z", "Ctime": "2018-09-24T07:56:35.3135567Z", "Btime": "2018-09-24T07:55:29.7664719Z", + "FNBtime": "2018-09-24T07:55:29.7664719Z", + "FNMtime": "2018-09-24T07:55:29.7664719Z", "Name": "Hello world text document.txt", "NameType": "POSIX", "Size": 12, @@ -19,6 +21,8 @@ "Atime": "2018-09-24T07:56:35.3135567Z", "Ctime": "2018-09-24T07:56:35.3135567Z", "Btime": "2018-09-24T07:55:29.7664719Z", + "FNBtime": "2018-09-24T07:55:29.7664719Z", + "FNMtime": "2018-09-24T07:55:29.7664719Z", "Name": "Hello world text document.txt:goodbye.txt", "NameType": "POSIX", "Size": 20, @@ -48,6 +52,8 @@ "Atime": "2018-09-24T07:56:35.3135567Z", "Ctime": "2018-09-24T07:55:29.7664719Z", "Btime": "2018-09-24T07:56:35.3135567Z", + "FNBtime": "0001-01-01T00:00:00Z", + "FNMtime": "0001-01-01T00:00:00Z", "Name": "Hello world text document.txt", "NameType": "POSIX", "Size": 12,