fix: use separate variable for evalMathExpression result
This commit is contained in:
@@ -325,12 +325,12 @@ func (h *Handler) Math(imageBase64 string) (result string, err error) {
|
||||
return "", fmt.Errorf("无法识别表达式")
|
||||
}
|
||||
|
||||
result, err = evalMathExpression(expr)
|
||||
evalResult, err := evalMathExpression(expr)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return fmt.Sprintf("%v", result), nil
|
||||
return fmt.Sprintf("%v", evalResult), nil
|
||||
}
|
||||
|
||||
func preprocessMath(img image.Image) ([]float32, error) {
|
||||
|
||||
Reference in New Issue
Block a user