Skip to content

Instantly share code, notes, and snippets.

@paralin
Created January 7, 2022 00:00
Show Gist options
  • Select an option

  • Save paralin/cf692975495c1d5acb1b89dc6e55dd72 to your computer and use it in GitHub Desktop.

Select an option

Save paralin/cf692975495c1d5acb1b89dc6e55dd72 to your computer and use it in GitHub Desktop.
antomedv/expr: dashes in variable names
package main
import (
"fmt"
"github.com/antonmedv/expr"
)
func main() {
v, err := expr.Eval("props[\"effective-ranking\"]", map[string]interface{}{
"props": map[string]string{
"effective-ranking": "1000.0",
},
})
fmt.Println(v, err)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment