From b17a21b8465b2f02b301dc81f0ed7b41ca4321be Mon Sep 17 00:00:00 2001 From: Seednode Date: Thu, 8 Feb 2024 15:36:07 -0600 Subject: [PATCH] Remove ': null' from JSON output --- cmd/index.go | 3 ++- cmd/root.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/index.go b/cmd/index.go index 627fd29..fe353a7 100644 --- a/cmd/index.go +++ b/cmd/index.go @@ -5,6 +5,7 @@ Copyright © 2024 Seednode package cmd import ( + "bytes" "encoding/gob" "encoding/json" "fmt" @@ -57,7 +58,7 @@ func makeTree(list []string) ([]byte, error) { return []byte{}, err } - return resp, nil + return bytes.ReplaceAll(resp, []byte(": null"), []byte{}), nil } func (index *fileIndex) List() []string { diff --git a/cmd/root.go b/cmd/root.go index 1540e54..4d8e4a6 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -17,7 +17,7 @@ import ( const ( AllowedCharacters string = `^[A-z0-9.\-_]+$` - ReleaseVersion string = "8.6.0" + ReleaseVersion string = "8.6.1" ) var (