functional simple api

This commit is contained in:
2024-08-23 16:39:20 -05:00
parent f9354196dd
commit ae4f12c159
18 changed files with 234 additions and 216 deletions

View File

@@ -3,11 +3,11 @@ package nkode
import (
"errors"
"fmt"
"go-nkode/core/model"
m "go-nkode/core/model"
"go-nkode/util"
)
func SelectKeyByAttrIdx(interfaceUser []int, passcodeIdxs []int, keypadSize model.KeypadSize) ([]int, error) {
func SelectKeyByAttrIdx(interfaceUser []int, passcodeIdxs []int, keypadSize m.KeypadSize) ([]int, error) {
selectedKeys := make([]int, len(passcodeIdxs))
for idx := range passcodeIdxs {
attrIdx := util.IndexOf[int](interfaceUser, passcodeIdxs[idx])