Skip to content

Commit

Permalink
fix: formatting and lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
pavlis@sinep.local committed Oct 17, 2024
1 parent 1324db7 commit b900b84
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
11 changes: 4 additions & 7 deletions prepare.go
Original file line number Diff line number Diff line change
Expand Up @@ -1443,13 +1443,12 @@ func prepareAT(text string) string {
func prepareSK(text string) string {

tokens := map[string]string{
"Domain registrant": "Registrant",
"Authorised Registrar": "Registrar",
"Domain registrant": "Registrant",
"Authorised Registrar": "Registrar",
"Administrative Contact": "Administrative",
"Technical Contact": "Technical",
}

token := ""
result := ""
prefix := ""

Expand All @@ -1459,14 +1458,13 @@ func prepareSK(text string) string {
v = strings.Replace(v, "\r", "", -1)

if v == "" {
token = ""
continue
}

if strings.Contains(v,":"){
if strings.Contains(v, ":") {
vs := strings.SplitN(v, ":", 2)
value := strings.TrimSpace(vs[1])
token = strings.TrimSpace(vs[0])
token := strings.TrimSpace(vs[0])

if _, ok := tokens[token]; ok {
prefix = tokens[token]
Expand All @@ -1481,4 +1479,3 @@ func prepareSK(text string) string {

return result
}

4 changes: 2 additions & 2 deletions rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ var (
"domain registered": "created_date",
"modified": "updated_date",
"changed": "updated_date",
"updated": "updated_date",
"updated": "updated_date",
"update date": "updated_date",
"updated date": "updated_date",
"updated on": "updated_date",
Expand Down Expand Up @@ -119,7 +119,7 @@ var (
"registrant nic hdl": "registrant_id",
"registrant nic handle": "registrant_id",
"registrant org id": "registrant_id",
"registrant domain registrant": "registrant_id",
"registrant domain registrant": "registrant_id",
"registrant name": "registrant_name",
"registrant person": "registrant_name",
"registrant contact": "registrant_name",
Expand Down

0 comments on commit b900b84

Please sign in to comment.