Refactor work out into worker type
This commit is contained in:
parent
95170eb8ed
commit
8df21cd8d9
5 changed files with 224 additions and 203 deletions
|
|
@ -46,8 +46,8 @@ func stringsFrom(obj *otto.Object) []string {
|
|||
lengthValue, _ := obj.Get("length")
|
||||
length, _ := lengthValue.ToInteger()
|
||||
ulength := uint32(length)
|
||||
for index := uint32(0); index < ulength; index += 1 {
|
||||
name := strconv.FormatInt(int64(index), 10)
|
||||
for i := uint32(0); i < ulength; i++ {
|
||||
name := strconv.FormatInt(int64(i), 10)
|
||||
value, err := obj.Get(name)
|
||||
if err != nil || !value.IsString() {
|
||||
continue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue