aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/email/parser.go
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2023-02-21 16:26:38 +0100
committerAleksandr Nogikh <wp32pw@gmail.com>2023-02-24 15:09:49 +0100
commit6a06699b9b5630efc401d00640a52d10752161ed (patch)
treeca75fcc10657a83d7231c01c2e58b9889a4a5800 /pkg/email/parser.go
parentcd476bafbcabc582195e27ff6c93001c85e4063a (diff)
pgk/email: parse the new "set" command
For now this command will be used to manually set bug's subsystems.
Diffstat (limited to 'pkg/email/parser.go')
-rw-r--r--pkg/email/parser.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/email/parser.go b/pkg/email/parser.go
index 9de71f731..e3a99ceba 100644
--- a/pkg/email/parser.go
+++ b/pkg/email/parser.go
@@ -45,6 +45,7 @@ const (
CmdTest
CmdInvalid
CmdUnCC
+ CmdSet
cmdTest5
)
@@ -276,6 +277,8 @@ func extractCommand(body string) (cmd Command, str, args string) {
switch cmd {
case CmdTest:
args = extractArgsTokens(body[cmdPos+cmdEnd:], 2)
+ case CmdSet:
+ args = extractArgsLine(body[cmdPos+cmdEnd:])
case cmdTest5:
args = extractArgsTokens(body[cmdPos+cmdEnd:], 5)
case CmdFix, CmdDup:
@@ -306,6 +309,8 @@ func strToCmd(str string) Command {
return CmdInvalid
case "uncc", "uncc:":
return CmdUnCC
+ case "set", "set:":
+ return CmdSet
case "test_5_arg_cmd":
return cmdTest5
}