Linter fixes (error handling, unused constants, raw strings)

This commit is contained in:
comp500
2023-03-10 17:06:48 +00:00
parent da04eb7f13
commit aeae76a569
9 changed files with 30 additions and 19 deletions

View File

@@ -58,7 +58,10 @@ var serveCmd = &cobra.Command{
}
indexPageBuf := new(bytes.Buffer)
t.Execute(indexPageBuf, struct{ Port string }{Port: port})
err = t.Execute(indexPageBuf, struct{ Port string }{Port: port})
if err != nil {
panic(fmt.Errorf("failed to compile index page template: %w", err))
}
// Force-disable no-internal-hashes mode (equiv to --build flag in refresh) for serving over HTTP
if viper.GetBool("no-internal-hashes") {