1
0
mirror of https://github.com/securego/gosec.git synced 2025-11-29 22:37:59 +02:00

Enable Go 1.18 in the ci and release workflows

* Enable Go 1.18 in the ci and release workflows

* Fix lint warning

* Add golangci as a make target
This commit is contained in:
Cosmin Cojocar
2022-03-21 16:53:22 +01:00
committed by GitHub
parent b99b5f7838
commit 607d607b51
6 changed files with 15 additions and 49 deletions

View File

@@ -1,6 +1,3 @@
//go:build go1.12
// +build go1.12
package main
import (
@@ -14,9 +11,10 @@ import (
"log"
"net/http"
"path/filepath"
"strings"
"github.com/mozilla/tls-observatory/constants"
"golang.org/x/text/cases"
"golang.org/x/text/language"
)
var (
@@ -82,7 +80,8 @@ func getTLSConfFromURL(url string) (*ServerSideTLSJson, error) {
}
func getGoCipherConfig(name string, sstls ServerSideTLSJson) (goCipherConfiguration, error) {
cipherConf := goCipherConfiguration{Name: strings.Title(name)}
caser := cases.Title(language.English)
cipherConf := goCipherConfiguration{Name: caser.String(name)}
conf, ok := sstls.Configurations[name]
if !ok {
return cipherConf, fmt.Errorf("TLS configuration '%s' not found", name)