mirror of
https://github.com/matter-labs/vault-auth-tee.git
synced 2025-07-21 07:43:57 +02:00
all: use errors.New() which has no param instead of fmt.Errorf()
This commit is contained in:
parent
f0ea96f2e4
commit
f62d3e0d0f
3 changed files with 14 additions and 11 deletions
|
@ -9,12 +9,13 @@ package vault_auth_tee
|
|||
|
||||
import (
|
||||
"crypto/tls"
|
||||
"fmt"
|
||||
"gitlab.com/hacklunch/ntp"
|
||||
"gitlab.com/hacklunch/ntske"
|
||||
"errors"
|
||||
"log"
|
||||
"math/rand"
|
||||
"time"
|
||||
|
||||
"gitlab.com/hacklunch/ntp"
|
||||
"gitlab.com/hacklunch/ntske"
|
||||
)
|
||||
|
||||
// Gets the rough network time using NTS-KE.
|
||||
|
@ -105,11 +106,11 @@ func getRoughNtsUnixTime() (time.Time, error) {
|
|||
}
|
||||
|
||||
if queried < numToQuery {
|
||||
return retTime, fmt.Errorf("failed to query enough servers")
|
||||
return retTime, errors.New("failed to query enough servers")
|
||||
}
|
||||
|
||||
if sumOffset > time.Minute {
|
||||
return retTime, fmt.Errorf("queried time fluctuates too much")
|
||||
return retTime, errors.New("queried time fluctuates too much")
|
||||
}
|
||||
|
||||
return retTime, nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue