-
-
Notifications
You must be signed in to change notification settings - Fork 303
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
Feature/eval template #651
Conversation
Codecov Report
@@ Coverage Diff @@
## master #651 +/- ##
========================================
+ Coverage 35.4% 35.6% +0.2%
========================================
Files 335 338 +3
Lines 12249 12210 -39
========================================
+ Hits 4336 4347 +11
+ Misses 7494 7444 -50
Partials 419 419 |
pkg/drivers/cdp/eval/function.go
Outdated
|
||
func (fn *Function) withArg(arg runtime.CallArgument) *Function { | ||
if fn.args == nil { | ||
fn.args = make([]runtime.CallArgument, 0, 5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5 looks like a magic number
pkg/drivers/cdp/eval/helpers.go
Outdated
return "function () {\n" + exp + "\n}" | ||
} | ||
|
||
var buf bytes.Buffer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use strings.Builder
. It is more preferable for building strings and has the same API
buf.WriteString("arg") | ||
buf.WriteString(strconv.Itoa(i)) | ||
|
||
if i != lastIndex { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an error in arguments part
New eval templates and interaction with HTML elements/