Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/phoneparser/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

func main() {
if len(os.Args) != 3 {
fmt.Println("usage: phoneparser [number] [two letter coutry]")
fmt.Println("usage: phoneparser [number] [two letter country]")
os.Exit(1)
}

Expand Down
2 changes: 1 addition & 1 deletion insertablebuffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func (b *Builder) Truncate(n int) {
b.lastRead = opInvalid
switch {
case n < 0 || n > b.Len():
// Originall this was a panic, but I hate panicing (hehe),
// Originally this was a panic, but I hate panicking (hehe),
// so instead let's just ignore this issue.
// panic("bytes.Buffer: truncation out of range")
return
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions phonenumbers.go
Original file line number Diff line number Diff line change
Expand Up @@ -2461,7 +2461,7 @@ func testNumberLength(number string, metadata *PhoneMetadata, numberType PhoneNu

actualLength := int32(len(number))

// This is safe because there is never an overlap beween the possible lengths and the local-only
// This is safe because there is never an overlap between the possible lengths and the local-only
// lengths; this is checked at build time.
for _, l := range localLengths {
if l == actualLength {
Expand Down Expand Up @@ -3394,7 +3394,7 @@ func IsMobileNumberPortableRegion(regionCode string) bool {

// GetTimezonesForPrefix returns a slice of Timezones corresponding to the number passed
// or error when it is impossible to convert the string to int
// The algorythm tries to match the timezones starting from the maximum
// The algorithm tries to match the timezones starting from the maximum
// number of phone number digits and decreasing until it finds one or reaches 0
func GetTimezonesForPrefix(number string) ([]string, error) {
var err error
Expand Down
2 changes: 1 addition & 1 deletion phonenumbers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func TestExtractPossibleNumber(t *testing.T) {
assert.Equal(t, "530) 583-6985 x302", extractPossibleNumber("(530) 583-6985 x302/x2303")) // yes, the leading '(' is missing
}

func TestIsViablePhoneNumer(t *testing.T) {
func TestIsViablePhoneNumber(t *testing.T) {
var tests = []struct {
input string
isViable bool
Expand Down
Loading