From 4f432da2b9240f28b486c325349ea23d08763118 Mon Sep 17 00:00:00 2001 From: Celestino Amoroso Date: Sun, 2 Jun 2024 11:32:47 +0200 Subject: [PATCH] typeFilepath and typeDirpath renamed as paramFilepath and paramDirpath respectively --- common-params.go | 13 ++----------- func-os.go | 6 +++--- 2 files changed, 5 insertions(+), 14 deletions(-) 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),