Skip to content

Commit

Permalink
chore: rename sanitizeData to sanitize (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
danroc authored Nov 17, 2024
1 parent edea628 commit 3bb808d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/database/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ type Entry struct {
Data []string
}

// sanitizeData trims the leading and trailing spaces from the given strings.
func sanitizeData(data []string) []string {
// sanitize trims the leading and trailing spaces from the given strings.
func sanitize(data []string) []string {
sanitized := make([]string, len(data))
for i, d := range data {
sanitized[i] = strings.TrimSpace(d)
Expand All @@ -36,7 +36,7 @@ func parseRecords(records [][]string) ([]Entry, error) {
var (
startIP = net.ParseIP(record[0])
endIP = net.ParseIP(record[1])
data = sanitizeData(record[2:])
data = sanitize(record[2:])
)

if startIP == nil {
Expand Down

0 comments on commit 3bb808d

Please sign in to comment.