mirror of
https://github.com/outbackdingo/labca.git
synced 2026-01-27 18:19:33 +00:00
Refactor some deprecated code
This commit is contained in:
@@ -14,6 +14,7 @@ require (
|
||||
github.com/nbutton23/zxcvbn-go v0.0.0-20201221231540-e56b841a3c88
|
||||
github.com/spf13/viper v1.7.1
|
||||
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad
|
||||
golang.org/x/text v0.3.2
|
||||
)
|
||||
|
||||
require (
|
||||
@@ -31,7 +32,6 @@ require (
|
||||
github.com/spf13/pflag v1.0.3 // indirect
|
||||
github.com/subosito/gotenv v1.2.0 // indirect
|
||||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037 // indirect
|
||||
golang.org/x/text v0.3.2 // indirect
|
||||
gopkg.in/ini.v1 v1.51.0 // indirect
|
||||
gopkg.in/yaml.v2 v2.2.4 // indirect
|
||||
)
|
||||
|
||||
@@ -43,6 +43,8 @@ import (
|
||||
"github.com/nbutton23/zxcvbn-go"
|
||||
"github.com/spf13/viper"
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
"golang.org/x/text/cases"
|
||||
"golang.org/x/text/language"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -1472,7 +1474,7 @@ func _certCreate(w http.ResponseWriter, r *http.Request, certBase string, isRoot
|
||||
}
|
||||
|
||||
if err := ci.Create(path, certBase); err != nil {
|
||||
ci.Errors[strings.Title(ci.CreateType)] = err.Error()
|
||||
ci.Errors[cases.Title(language.Und).String(ci.CreateType)] = err.Error()
|
||||
log.Printf("_certCreate: create failed: %v", err)
|
||||
render(w, r, "cert:manage", map[string]interface{}{"CertificateInfo": ci, "Progress": _progress(certBase), "HelpText": _helptext(certBase)})
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user