Skip to content
Snippets Groups Projects
Commit 02d31b74 authored by Reviath's avatar Reviath
Browse files

Creating evals folder with os.Mkdir.

parent 367fe596
No related branches found
No related tags found
No related merge requests found
Pipeline #676 passed
......@@ -16,7 +16,13 @@ import (
// EvalCommand is a handler for eval command
func EvalCommand(ctx CommandHandler.Context, _ []string) error {
uuidvar := uuid.New()
_, err := os.Create(fmt.Sprintf("./evals/%s.go", uuidvar))
err := os.Mkdir("./evals", os.ModeDevice)
if err != nil {
ctx.Reply("Error while creating evals folder")
time.Sleep(1 * time.Second)
ctx.Reply(err.Error())
}
_, err = os.Create(fmt.Sprintf("./evals/%s.go", uuidvar))
if err != nil {
ctx.Reply("Error while creating file..")
time.Sleep(1 * time.Second)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment