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

Feature/eval template #651

Merged
merged 16 commits into from
Sep 7, 2021
Merged

Feature/eval template #651

merged 16 commits into from
Sep 7, 2021

Conversation

ziflex
Copy link
Member

@ziflex ziflex commented Sep 4, 2021

New eval templates and interaction with HTML elements/

@codecov
Copy link

codecov bot commented Sep 4, 2021

Codecov Report

Merging #651 (82ad366) into master (5f361e9) will increase coverage by 0.2%.
The diff coverage is 3.3%.

@@           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             


func (fn *Function) withArg(arg runtime.CallArgument) *Function {
if fn.args == nil {
fn.args = make([]runtime.CallArgument, 0, 5)
Copy link
Member

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

return "function () {\n" + exp + "\n}"
}

var buf bytes.Buffer
Copy link
Member

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 {
Copy link
Member

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

https://play.golang.org/p/JvlRDSV5ZxF

@ziflex ziflex merged commit e4e9883 into master Sep 7, 2021
@ziflex ziflex deleted the feature/eval-template branch September 10, 2021 01:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants