From bf1c58d588380d4b75cd548db488c441fe73593a Mon Sep 17 00:00:00 2001 From: Ibraheem Ahmed Date: Fri, 18 Sep 2020 11:28:09 -0400 Subject: [PATCH] fix spelling mistakes --- client_state.go | 4 ++-- config.go | 2 +- go.sum | 4 ++++ mocks/mocks.go | 2 +- oauth2/oauth2.go | 2 +- storage.go | 2 +- user.go | 2 +- validation_test.go | 4 ++-- 8 files changed, 13 insertions(+), 9 deletions(-) diff --git a/client_state.go b/client_state.go index 367f7bf..4eb5ba1 100644 --- a/client_state.go +++ b/client_state.go @@ -38,9 +38,9 @@ const ( // CookieRemember is used for cookies and form input names. CookieRemember = "rm" - // FlashSuccessKey is used for storing sucess flash messages on the session + // FlashSuccessKey is used for storing success flash messages on the session FlashSuccessKey = "flash_success" - // FlashErrorKey is used for storing sucess flash messages on the session + // FlashErrorKey is used for storing success flash messages on the session FlashErrorKey = "flash_error" ) diff --git a/config.go b/config.go index 5b7ef0e..84c64ac 100644 --- a/config.go +++ b/config.go @@ -77,7 +77,7 @@ type Config struct { // LockAfter this many tries. LockAfter int - // LockWindow is the waiting time before the number of attemps are reset. + // LockWindow is the waiting time before the number of attempts are reset. LockWindow time.Duration // LockDuration is how long an account is locked for. LockDuration time.Duration diff --git a/go.sum b/go.sum index e46580e..443c832 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,9 @@ +cloud.google.com/go v0.34.0 h1:eOI3/cP2VTU6uZLDYAoic+eyzzB9YyGmJ7eIjl8rOPg= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/friendsofgo/errors v0.9.2 h1:X6NYxef4efCBdwI7BgS820zFaN7Cphrmb+Pljdzjtgk= github.com/friendsofgo/errors v0.9.2/go.mod h1:yCvFW5AkDIL9qn7suHVLiI/gH228n7PC4Pn44IGoTOI= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -13,7 +15,9 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnk golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= diff --git a/mocks/mocks.go b/mocks/mocks.go index ffe9552..1e77687 100644 --- a/mocks/mocks.go +++ b/mocks/mocks.go @@ -113,7 +113,7 @@ func (u User) GetTOTPSecretKey() string { return u.TOTPSecretKey } // GetSMSPhoneNumber from user func (u User) GetSMSPhoneNumber() string { return u.SMSPhoneNumber } -// GetSMSPhoneNumber from user +// GetSMSPhoneNumberSeed from user func (u User) GetSMSPhoneNumberSeed() string { return u.SMSPhoneNumberSeed } // GetRecoveryCodes from user diff --git a/oauth2/oauth2.go b/oauth2/oauth2.go index 5547912..2a072dd 100644 --- a/oauth2/oauth2.go +++ b/oauth2/oauth2.go @@ -78,7 +78,7 @@ func init() { func (o *OAuth2) Init(ab *authboss.Authboss) error { o.Authboss = ab - // Do annoying sorting on keys so we can have predictible + // Do annoying sorting on keys so we can have predictable // route registration (both for consistency inside the router but // also for tests -_-) var keys []string diff --git a/storage.go b/storage.go index 393baa7..14013b1 100644 --- a/storage.go +++ b/storage.go @@ -1,6 +1,6 @@ package authboss -// A concious decision was made to put all storer +// A conscious decision was made to put all storer // and user types into this file despite them truly // belonging to outside modules. The reason for this // is because documentation-wise, it was previously diff --git a/user.go b/user.go index a3cbfd8..b97ba84 100644 --- a/user.go +++ b/user.go @@ -88,7 +88,7 @@ type ArbitraryUser interface { } // OAuth2User allows reading and writing values relating to OAuth2 -// Also see MakeOAuthPID/ParseOAuthPID for helpers to fullfill the User +// Also see MakeOAuthPID/ParseOAuthPID for helpers to fulfill the User // part of the interface. type OAuth2User interface { User diff --git a/validation_test.go b/validation_test.go index 1edaf57..0bff5ba 100644 --- a/validation_test.go +++ b/validation_test.go @@ -72,10 +72,10 @@ func TestErrorList_Map(t *testing.T) { unknownErrs := m[""] if len(unknownErrs) != 1 { - t.Error("Wrong number of unkown errors:", len(unknownErrs)) + t.Error("Wrong number of unknown errors:", len(unknownErrs)) } if unknownErrs[0] != errAsploded { - t.Error("Wrong unkown error at 0:", unknownErrs[0]) + t.Error("Wrong unknown error at 0:", unknownErrs[0]) } }