Refactor Type to be an int
Some checks failed
Publish Image / publish (push) Waiting to run
Test / build (push) Waiting to run
Build / build (push) Has been cancelled

This commit is contained in:
Chuck Smith
2024-03-29 11:01:15 -04:00
parent f65d7bfb1c
commit 12d43c9835
58 changed files with 164 additions and 132 deletions

View File

@@ -23,7 +23,7 @@ func Find(args ...object.Object) object.Object {
if haystack, ok := args[0].(*object.String); ok {
if err := typing.Check(
"find", args,
typing.WithTypes(object.STRING_OBJ, object.STRING_OBJ),
typing.WithTypes(object.StringType, object.StringType),
); err != nil {
return newError(err.Error())
}
@@ -46,7 +46,7 @@ func Find(args ...object.Object) object.Object {
}
return newError(
"TypeError: find() expected argument #1 to be `array` or `str` got `%s`",
"TypeError: find() expected argument #1 to be `array` or `str` got `%d`",
args[0].Type(),
)
}