Skip to content

Commit 47711f1

Browse files
committed
#72 Initialize the sourcelist, foundtoken using make()
1 parent b827487 commit 47711f1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rfc1123/lib.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ func Find(argv1 string) string {
114114
for _, e := range prefix0x32 { sourcetext = strings.ReplaceAll(sourcetext, e, " " + e) }
115115
for _, e := range suffix0x32 { sourcetext = strings.ReplaceAll(sourcetext, e, e + " ") }
116116

117-
sourcelist := []string{}
118-
foundtoken := []string{}
117+
sourcelist := make([]string, 0, 25)
118+
foundtoken := make([]string, 0, 2)
119119
thelongest := uint8(0)
120120
hostnameis := ""
121121

0 commit comments

Comments
 (0)