From 238715037dec4f1afc49b2a008ae26d110133922 Mon Sep 17 00:00:00 2001 From: Michael Yang Date: Wed, 24 Apr 2024 16:08:51 -0700 Subject: [PATCH] linting --- parser/parser.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/parser/parser.go b/parser/parser.go index edb81615..1b80ebec 100644 --- a/parser/parser.go +++ b/parser/parser.go @@ -6,7 +6,6 @@ import ( "errors" "fmt" "io" - "slices" "strconv" "strings" ) @@ -66,7 +65,7 @@ func Parse(r io.Reader) (cmds []Command, err error) { cmd.Name = s } case stateMessage: - if !slices.Contains([]string{"system", "user", "assistant"}, b.String()) { + if !isValidRole(b.String()) { return nil, errInvalidRole } @@ -74,8 +73,6 @@ func Parse(r io.Reader) (cmds []Command, err error) { case stateComment, stateNil: // pass case stateValue: - s := b.String() - s, ok := unquote(b.String()) if !ok || isSpace(r) { if _, err := b.WriteRune(r); err != nil {