Misc lint fixes

This commit is contained in:
David Stotijn
2022-02-28 16:21:01 +01:00
parent af26987601
commit 857aa0c49e
12 changed files with 41 additions and 12 deletions

View File

@ -162,7 +162,8 @@ func NewCertUninstallCommand(rootConfig *Config) *ffcli.Command {
fs.StringVar(&cmd.cert, "cert", "~/.hetty/hetty_cert.pem", "Path to certificate.")
fs.BoolVar(&cmd.firefox, "firefox", false, "Uninstall certificate from Firefox trust store. (Default: false)")
fs.BoolVar(&cmd.java, "java", false, "Uninstall certificate from Java trust store. (Default: false)")
fs.BoolVar(&cmd.skipSystem, "skip-system", false, "Skip uninstalling certificate from system trust store (Default: false)")
fs.BoolVar(&cmd.skipSystem, "skip-system", false,
"Skip uninstalling certificate from system trust store (Default: false)")
cmd.config.RegisterFlags(fs)

View File

@ -288,6 +288,7 @@ func (cmd *HettyCommand) Exec(ctx context.Context, _ []string) error {
// Note: We expect httpServer.Handler to handle timeouts, thus, we don't
// need a context value with deadline here.
//nolint:contextcheck
err = httpServer.Shutdown(context.Background())
if err != nil {
return fmt.Errorf("failed to shutdown HTTP server: %w", err)

View File

@ -23,6 +23,7 @@ func main() {
if err != nil {
llog.Fatal(err)
}
//nolint:errcheck
defer logger.Sync()
cfg.logger = logger