From 46c7592f34eefcb85612d66e7456eb6af791f3c9 Mon Sep 17 00:00:00 2001 From: max furman Date: Fri, 26 Apr 2019 13:08:14 -0700 Subject: [PATCH] db: Omit empty optional fields from JSON --- db/db.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/db.go b/db/db.go index e2d044bd..886c3ef7 100644 --- a/db/db.go +++ b/db/db.go @@ -22,8 +22,8 @@ var ErrAlreadyExists = errors.New("already exists") type Config struct { Type string `json:"type"` DataSource string `json:"dataSource"` - ValueDir string `json:"valueDir"` - Database string `json:"database"` + ValueDir string `json:"valueDir,omitempty"` + Database string `json:"database,omitempty"` } // AuthDB is an interface over an Authority DB client that implements a nosql.DB interface.