fix linter issues (#329)

* fix linter issues
* replace fmt with logger
Signed-off-by: Fabian Kammel <fk@edgeless.systems>
Co-authored-by: Daniel Weiße <66256922+daniel-weisse@users.noreply.github.com>
This commit is contained in:
Fabian Kammel 2022-08-02 16:25:47 +02:00 committed by GitHub
parent 1859dc1718
commit 985585f578
8 changed files with 41 additions and 16 deletions

View file

@ -134,6 +134,16 @@ func exportPCRs() error {
Host: "10.42.0.1:8080", // QEMU metadata endpoint
Path: "/pcrs",
}
_, err = http.Post(url.String(), "application/json", bytes.NewBuffer(pcrsPretty))
return err
req, err := http.NewRequestWithContext(context.Background(), http.MethodPost, url.String(), bytes.NewBuffer(pcrsPretty))
if err != nil {
return err
}
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
return err
}
defer resp.Body.Close()
return nil
}