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

Fix header client. Simplify code.

This commit is contained in:
Sascha L. Teichmann 2023-03-24 13:40:31 +01:00
parent 8f87273837
commit 0c2768b711
6 changed files with 9 additions and 18 deletions

View file

@ -147,7 +147,7 @@ func (c *controller) failed(rw http.ResponseWriter, tmpl string, err error) {
}
// index calls the "render" function and passes the "index.html" and c.cfg to it.
func (c *controller) index(rw http.ResponseWriter, r *http.Request) {
func (c *controller) index(rw http.ResponseWriter, _ *http.Request) {
c.render(rw, "index.html", map[string]any{
"Config": c.cfg,
})

View file

@ -30,8 +30,5 @@ func writeHashedFile(fname, name string, data []byte, armored string) error {
return err
}
// Write signature.
if err := os.WriteFile(fname+".asc", []byte(armored), 0644); err != nil {
return err
}
return nil
return os.WriteFile(fname+".asc", []byte(armored), 0644)
}