1
0
mirror of https://github.com/robertkrimen/otto synced 2025-10-26 20:28:49 +08:00
Commit Graph

5 Commits

Author SHA1 Message Date
Steven Hartland
c4b94300e3
feat: support push to go slices (#460)
Add support for direct use of push to go slices without converting to
array using .slice().

Fixes #357

Also:
* Add classGoSlice and use it, to make it clear the type when debugging.
2022-11-27 23:09:00 +00:00
Steven Hartland
a3b51c68f2
chore: enable whitespace linter and fix errors (#456)
Enable the whitespace linter and fix the errors resulting from it.

Also:
* Remove unneeded golangci-lint config for disabled linters.
* Correct test number for panic in previous commit.
2022-11-26 13:33:09 +00:00
Steven Hartland
52d4954a54
fix: catch panic in try catch (#455)
Ensure that a panic is caught if thrown in a try catch block.

Fixes #382
2022-11-26 11:35:10 +00:00
Steven Hartland
08e7a8d472
fix: array writes (#454)
Fix array writes not being persisted by passing in writeable
reflect.Value when available instead of .Interface() which looses that
property.

Also:
* Use value.IsValid() instead of comparison with zero entry.
* Use propertyLength instead of literal.

Fixes #386
2022-11-26 02:57:29 +00:00
Steven Hartland
b6f2991c96
chore: clean up issue tests (#453)
Move all issue tests into issue_test.go and use common naming
convention.
2022-11-26 00:44:36 +00:00