1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-22 05:40:11 +01:00

Implemented loading of PGP keys.

This commit is contained in:
Sascha L. Teichmann 2021-12-13 19:24:44 +01:00
parent fe09d0ea65
commit f945937a6d
3 changed files with 142 additions and 13 deletions

20
util/json.go Normal file
View file

@ -0,0 +1,20 @@
// This file is Free Software under the MIT License
// without warranty, see README.md and LICENSES/MIT.txt for details.
//
// SPDX-License-Identifier: MIT
//
// SPDX-FileCopyrightText: 2021 German Federal Office for Information Security (BSI) <https://www.bsi.bund.de>
// Software-Engineering: 2021 Intevation GmbH <https://intevation.de>
package util
import "encoding/json"
// ReMarshalJSON transforms data from src to dst via JSON marshalling.
func ReMarshalJSON(dst, src interface{}) error {
intermediate, err := json.Marshal(src)
if err != nil {
return err
}
return json.Unmarshal(intermediate, dst)
}