From 0bdffe5c8bdb86dd9959df213b28a87f9dd5431d Mon Sep 17 00:00:00 2001 From: Mrinal Wadhwa Date: Fri, 9 Nov 2018 12:55:07 -0800 Subject: [PATCH] fix: typos in comments and test descriptions --- did.go | 4 ++-- did_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/did.go b/did.go index d21f7f7..c7cd28d 100644 --- a/did.go +++ b/did.go @@ -152,7 +152,7 @@ func (p *parser) parseScheme() parserStep { currentIndex := 3 // 4 bytes in 'did:', i.e index 3 - // the grammer requires `did:` prefix + // the grammar requires `did:` prefix if p.input[:currentIndex+1] != "did:" { return p.errorf(currentIndex, "input does not begin with 'did:' prefix") } @@ -193,7 +193,7 @@ func (p *parser) parseMethod() parserStep { break } - // as per the grammer method can only be made of digits 0-9 or small letters a-z + // as per the grammar method can only be made of digits 0-9 or small letters a-z if isNotDigit(char) && isNotSmallLetter(char) { return p.errorf(currentIndex, "character is not a-z OR 0-9") } diff --git a/did_test.go b/did_test.go index 3d04949..a25d5f0 100644 --- a/did_test.go +++ b/did_test.go @@ -398,7 +398,7 @@ func TestParse(t *testing.T) { } }) - t.Run("succeeds with percent encoded chars in fragement", func(t *testing.T) { + t.Run("succeeds with percent encoded chars in fragment", func(t *testing.T) { d, err := Parse("did:a:123:456#aaaaaa%20a") if err != nil { t.Errorf("error is not nil - %+v", err)