From 4886cd6b9d9323a91474b17f491a22715b066cd9 Mon Sep 17 00:00:00 2001 From: Steve McCoy Date: Thu, 30 Aug 2018 13:51:24 -0400 Subject: [PATCH] Use literal strings for these regexps --- plugins/picker/picker.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/picker/picker.go b/plugins/picker/picker.go index b596c22..12d8437 100644 --- a/plugins/picker/picker.go +++ b/plugins/picker/picker.go @@ -57,8 +57,8 @@ func (p *PickerPlugin) Message(message msg.Message) bool { return true } -var pickerListPrologue = regexp.MustParse("^pick[ \t]+([0-9]*)[ \t]+\{[ \t]+") -var pickerListItem = regexp.MustParse("^([^,]+),[ \t]+") +var pickerListPrologue = regexp.MustParse(`^pick[ \t]+([0-9]*)[ \t]+\{[ \t]+`) +var pickerListItem = regexp.MustParse(`^([^,]+),[ \t]+`) func (p * PickerPlugin) parse(body string) (int, []string, error) { subs := pickerListPrologue.FindStringSubmatch(body)