mirror of
https://github.com/ollama/ollama.git
synced 2026-04-21 16:25:42 +02:00
gocritic
This commit is contained in:
@@ -326,17 +326,11 @@ MESSAGE system`,
|
||||
return
|
||||
}
|
||||
|
||||
switch tt.err.(type) {
|
||||
case *ParserError:
|
||||
var pErr *ParserError
|
||||
if errors.As(err, &pErr) {
|
||||
// got the correct type of error
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if errors.Is(err, tt.err) {
|
||||
return
|
||||
} else if pErr := (*ParserError)(nil); errors.As(err, &pErr) {
|
||||
// got the correct type of error
|
||||
return
|
||||
}
|
||||
|
||||
t.Fatalf("unexpected error: expected: %v, actual: %v", tt.err, err)
|
||||
|
||||
Reference in New Issue
Block a user