diff --git a/common-params.go b/common-params.go index d86f519..2eb0bf5 100644 --- a/common-params.go +++ b/common-params.go @@ -16,15 +16,6 @@ const ( paramEnd = "end" paramValue = "value" paramEllipsis = "..." - typeFilepath = "filepath" - typeDirpath = "dirpath" + paramFilepath = "filepath" + paramDirpath = "dirpath" ) - -// const ( -// typeInteger = "int" -// typeFloat = "float" -// typeString = "string" -// typeFraction = "fract" -// typeList = "list" -// typeDict = "dict" -// ) diff --git a/func-os.go b/func-os.go index bf433d6..763aba3 100644 --- a/func-os.go +++ b/func-os.go @@ -188,13 +188,13 @@ func readFileFunc(ctx ExprContext, name string, args []any) (result any, err err func ImportOsFuncs(ctx ExprContext) { ctx.RegisterFunc("openFile", newGolangFunctor(openFileFunc), typeHandle, []ExprFuncParam{ - newFuncParam(typeFilepath), + newFuncParam(paramFilepath), }) ctx.RegisterFunc("appendFile", newGolangFunctor(appendFileFunc), typeHandle, []ExprFuncParam{ - newFuncParam(typeFilepath), + newFuncParam(paramFilepath), }) ctx.RegisterFunc("createFile", newGolangFunctor(createFileFunc), typeHandle, []ExprFuncParam{ - newFuncParam(typeFilepath), + newFuncParam(paramFilepath), }) ctx.RegisterFunc("writeFile", newGolangFunctor(writeFileFunc), typeInt, []ExprFuncParam{ newFuncParam(typeHandle),