🇧🇷 CPF validation in Go

golint fixes

+2 -2
+2 -2
cpf.go
··· 22 22 func checksum(ds []int64) int64 { 23 23 var s int64 24 24 for i, n := range ds { 25 - s += n * int64(len(ds) + 1 - i) 25 + s += n * int64(len(ds)+1-i) 26 26 } 27 27 r := 11 - (s % 11) 28 28 if r == 10 { ··· 67 67 return fmt.Sprintf("%s.%s.%s-%s", u[:3], u[3:6], u[6:9], u[9:]) 68 68 } 69 69 70 - //Unmask remove format and return the raw data 70 + //Unmask removes any non-digit (numeric) from the Cpf 71 71 func (c Cpf) Unmask() string { 72 72 return regexp.MustCompile(`\D`).ReplaceAllString(string(c), "") 73 73 }