forked from TrueCloudLab/certificates
db: Omit empty optional fields from JSON
This commit is contained in:
parent
c8fe1ad86d
commit
46c7592f34
1 changed files with 2 additions and 2 deletions
4
db/db.go
4
db/db.go
|
@ -22,8 +22,8 @@ var ErrAlreadyExists = errors.New("already exists")
|
||||||
type Config struct {
|
type Config struct {
|
||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
DataSource string `json:"dataSource"`
|
DataSource string `json:"dataSource"`
|
||||||
ValueDir string `json:"valueDir"`
|
ValueDir string `json:"valueDir,omitempty"`
|
||||||
Database string `json:"database"`
|
Database string `json:"database,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// AuthDB is an interface over an Authority DB client that implements a nosql.DB interface.
|
// AuthDB is an interface over an Authority DB client that implements a nosql.DB interface.
|
||||||
|
|
Loading…
Reference in a new issue