Small fixes
This commit is contained in:
parent
07cc8306c1
commit
bf9a80e336
@ -94,7 +94,7 @@ Result is returned as JSON in the following format:
|
|||||||
Description: "Path to a file within the current working directory to read.",
|
Description: "Path to a file within the current working directory to read.",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Required: []string{"file_path"},
|
Required: []string{"path"},
|
||||||
},
|
},
|
||||||
}},
|
}},
|
||||||
Impl: func(args map[string]interface{}) (string, error) {
|
Impl: func(args map[string]interface{}) (string, error) {
|
||||||
@ -130,7 +130,7 @@ Result is returned as JSON in the following format:
|
|||||||
Description: "The content to write to the file. Overwrites any existing content!",
|
Description: "The content to write to the file. Overwrites any existing content!",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Required: []string{"file_path"},
|
Required: []string{"path", "content"},
|
||||||
},
|
},
|
||||||
}},
|
}},
|
||||||
Impl: func(args map[string]interface{}) (string, error) {
|
Impl: func(args map[string]interface{}) (string, error) {
|
||||||
@ -148,7 +148,7 @@ Result is returned as JSON in the following format:
|
|||||||
}
|
}
|
||||||
content, ok := tmp.(string)
|
content, ok := tmp.(string)
|
||||||
if !ok {
|
if !ok {
|
||||||
return "", fmt.Errorf("Invalido content in function arguments: %v", tmp)
|
return "", fmt.Errorf("Invalid content in function arguments: %v", tmp)
|
||||||
}
|
}
|
||||||
return WriteFile(path, content), nil
|
return WriteFile(path, content), nil
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user