Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

string Concat panic #13

Closed
zhangyc310 opened this issue Apr 28, 2016 · 2 comments
Closed

string Concat panic #13

zhangyc310 opened this issue Apr 28, 2016 · 2 comments
Assignees
Labels

Comments

@zhangyc310
Copy link

zhangyc310 commented Apr 28, 2016

Hi,govaluate is superising , but when I concat string , it panic.

package main
import (
    "log"
    "github.com/Knetic/govaluate"
)
func main() {
    expression, err := govaluate.NewEvaluableExpression("'http_response_body' + 'service is ok'")
    if err != nil {
        log.Printf("err1: ", err)
    }
    parameters := make(map[string]interface{}, 8)
    parameters["http_response_body"] = "service is ok"
    result, err := expression.Evaluate(parameters)
    if err != nil {
        log.Printf("err2: ", err)
    }
    log.Printf("rs: ", result)
}
@Knetic Knetic self-assigned this Apr 28, 2016
@Knetic Knetic added the bug label Apr 28, 2016
@Knetic
Copy link
Owner

Knetic commented Apr 28, 2016

Thanks for the report, and the sample!

It looks as if I left the implementation for string concatenation in a git stash but accidentally committed notes about it in the readme. You hit a bug with my process, it seems.

However, a fix has been pushed, so as of 63c7fee (which is in master branch now) your code sample ought to work.

@Knetic
Copy link
Owner

Knetic commented May 22, 2016

I can't repro anymore, so i'm closing this bug. Let me know if you still see problems.

@Knetic Knetic closed this as completed May 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants