Skip to content

Commit ecb723c

Browse files
committed
Use end-line-marker in regexp to match full lines
1 parent 5d18572 commit ecb723c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

discovery_server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ func (d *DiscoveryServer) hello(cmd string) {
155155
d.outputError("hello", "HELLO already called")
156156
return
157157
}
158-
re := regexp.MustCompile(`(\d+) "([^"]+)"`)
158+
re := regexp.MustCompile(`(\d+) "([^"]+)"$`)
159159
matches := re.FindStringSubmatch(cmd)
160160
if len(matches) != 3 {
161161
d.outputError("hello", "Invalid HELLO command")

0 commit comments

Comments
 (0)