Skip to content

Commit 6335ddb

Browse files
committed
gofmt.
1 parent aca9959 commit 6335ddb

File tree

3 files changed

+15
-16
lines changed

3 files changed

+15
-16
lines changed

config.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ func New(options ...option) *Redactor {
2020
}
2121

2222
return &Redactor{
23-
matched: matched,
24-
phone: &phoneRedaction{matched: matched},
25-
ssn: &ssnRedaction{matched: matched},
26-
credit: &creditCardRedaction{matched: matched},
27-
dob: &dobRedaction{matched: matched},
28-
email: &emailRedaction{matched: matched},
29-
monitor: config.Monitor,
23+
matched: matched,
24+
phone: &phoneRedaction{matched: matched},
25+
ssn: &ssnRedaction{matched: matched},
26+
credit: &creditCardRedaction{matched: matched},
27+
dob: &dobRedaction{matched: matched},
28+
email: &emailRedaction{matched: matched},
29+
monitor: config.Monitor,
3030
maxLength: config.MaxLength,
3131
}
3232
}

redact_structs.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ package redact
22

33
type Redactor struct {
44
*matched
5-
phone *phoneRedaction
6-
ssn *ssnRedaction
7-
credit *creditCardRedaction
8-
dob *dobRedaction
9-
email *emailRedaction
10-
monitor monitor
5+
phone *phoneRedaction
6+
ssn *ssnRedaction
7+
credit *creditCardRedaction
8+
dob *dobRedaction
9+
email *emailRedaction
10+
monitor monitor
1111
maxLength int
1212
}
1313

redactor.go

+2-3
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ func (this *Redactor) RedactAll(input []byte) []byte {
66
if length <= 0 {
77
return input
88
}
9-
if length > this.maxLength{
10-
input = input[0 : this.maxLength]
9+
if length > this.maxLength {
10+
input = input[0:this.maxLength]
1111
}
1212

1313
this.match(input, this.phone, this.email, this.ssn, this.dob, this.credit)
@@ -22,7 +22,6 @@ func (this *Redactor) redactMatches(input []byte) []byte {
2222
}
2323
this.monitor.Redacted(count)
2424

25-
2625
buffer := input
2726
bufferLength := len(buffer)
2827
var lowIndex, highIndex int

0 commit comments

Comments
 (0)