1
0
Fork 0

Updates of Lego.

This commit is contained in:
Ludovic Fernandez 2019-02-11 08:52:03 +01:00 committed by Traefiker Bot
parent 5f4d440493
commit 2b2cfdfb32
102 changed files with 8355 additions and 902 deletions

View file

@ -7,7 +7,7 @@ import (
"strings"
"github.com/go-ini/ini"
"gopkg.in/mattes/go-expand-tilde.v1"
"github.com/mitchellh/go-homedir"
)
// Config struct provides all the necessary fields to
@ -86,7 +86,7 @@ func InitEdgeRc(filepath string, section string) (Config, error) {
// Tilde seems to be not working when passing ~/.edgerc as file
// Takes current user and use home dir instead
path, err := tilde.Expand(filepath)
path, err := homedir.Expand(filepath)
if err != nil {
return c, fmt.Errorf(errorMap[ErrHomeDirNotFound], err)

View file

@ -14,8 +14,8 @@ import (
"time"
"unicode"
"github.com/google/uuid"
log "github.com/sirupsen/logrus"
"github.com/tuvistavie/securerandom"
)
const defaultSection = "DEFAULT"
@ -49,12 +49,12 @@ func makeEdgeTimeStamp() string {
// It is a random string used to detect replayed request messages.
// A GUID is recommended.
func createNonce() string {
uuid, err := securerandom.Uuid()
uuid, err := uuid.NewRandom()
if err != nil {
log.Errorf(errorMap[ErrUUIDGenerateFailed], err)
return ""
}
return uuid
return uuid.String()
}
func stringMinifier(in string) (out string) {