mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-07 00:35:17 -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
|
@ -1,6 +1,7 @@
|
|||
package qemu
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
|
@ -23,7 +24,12 @@ func (l *Logger) Disclose(msg string) {
|
|||
Path: "/log",
|
||||
}
|
||||
|
||||
_, _ = http.Post(url.String(), "application/json", strings.NewReader(msg))
|
||||
req, _ := http.NewRequestWithContext(context.Background(), http.MethodPost, url.String(), strings.NewReader(msg))
|
||||
req.Header.Set("Content-Type", "application/json")
|
||||
resp, err := http.DefaultClient.Do(req)
|
||||
if err == nil {
|
||||
defer resp.Body.Close()
|
||||
}
|
||||
}
|
||||
|
||||
// Close is a no-op.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue