chore: update Go, linter, CI

This commit is contained in:
Fernandez Ludovic
2022-09-10 12:29:58 +02:00
parent 2d6ebedb0f
commit 9b1db3f461
7 changed files with 74 additions and 30 deletions

5
app.go
View File

@ -7,7 +7,6 @@ import (
"flag"
"fmt"
"io"
"io/ioutil"
"log"
"net"
"net/http"
@ -85,7 +84,7 @@ func main() {
}
func setupMutualTLS(ca string) *tls.Config {
clientCACert, err := ioutil.ReadFile(ca)
clientCACert, err := os.ReadFile(ca)
if err != nil {
log.Fatal(err)
}
@ -312,7 +311,7 @@ func healthHandler(w http.ResponseWriter, req *http.Request) {
func getEnv(key, fallback string) string {
value := os.Getenv(key)
if len(value) == 0 {
if value == "" {
return fallback
}
return value