Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
metachris committed Sep 24, 2024
1 parent cd1d64c commit 68e7385
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
7 changes: 3 additions & 4 deletions cmd/status-api/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ func runCli(cCtx *cli.Context) error {
pipeFile := cCtx.String("pipe-file")

log := common.SetupLogger(&common.LoggingOpts{})

// Setup and start the server (in the background)
server, err := NewServer(&HTTPServerConfig{
ListenAddr: listenAddr,
Log: log,
Expand All @@ -51,10 +53,7 @@ func runCli(cCtx *cli.Context) error {
if err != nil {
return err
}

go func() {
server.Start()
}()
go server.Start()

// Wait for signal, then graceful shutdown
exit := make(chan os.Signal, 1)
Expand Down
11 changes: 5 additions & 6 deletions crypto/tls.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
// Generate a self-signed X.509 certificate for a TLS server.
//
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// Generate a self-signed X.509 certificate for a TLS server. Outputs to
// 'cert.pem' and 'key.pem' and will overwrite existing files.

//
// Source: https://go.dev/src/crypto/tls/generate_cert.go
// See also: https://gist.github.com/denji/12b3a568f092ab951456

// Package crypto provides helpers for key generation
package crypto

import (
Expand Down Expand Up @@ -43,7 +42,7 @@ func publicKey(priv any) any {
case *ecdsa.PrivateKey:
return &k.PublicKey
case ed25519.PrivateKey:
return k.Public().(ed25519.PublicKey)
return k.Public().(ed25519.PublicKey) //nolint:forcetypeassert
default:
return nil
}
Expand Down

0 comments on commit 68e7385

Please sign in to comment.