mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-08 06:52:26 -04:00
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:
parent
1859dc1718
commit
985585f578
8 changed files with 41 additions and 16 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue