typeFilepath and typeDirpath renamed as paramFilepath and paramDirpath respectively
This commit is contained in:
parent
e4b4b4fb79
commit
4f432da2b9
@ -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"
|
||||
// )
|
||||
|
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user