From 6a61ac4d178ef19b98c342cda183fdb700e346b9 Mon Sep 17 00:00:00 2001 From: Paulo Truta Date: Sun, 6 Feb 2022 17:25:41 +0000 Subject: [PATCH] Using fmt.Sprintf instead of casting int to string --- cmd/edgeboxctl/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/edgeboxctl/main.go b/cmd/edgeboxctl/main.go index 427910c..64e2bf1 100644 --- a/cmd/edgeboxctl/main.go +++ b/cmd/edgeboxctl/main.go @@ -52,7 +52,7 @@ func main() { task.ID = 0 task.Task = "start_edgeapp" task.Args = sql.NullString{String: fmt.Sprintf("{\"id\": \"%s\"}", c.Args().First()), Valid: true} - task.Status = string(tasks.STATUS_CREATED) + task.Status = fmt.Sprintf("%d", tasks.STATUS_CREATED) task.Created = currentFormattedTime task.Updated = currentFormattedTime @@ -70,7 +70,7 @@ func main() { task.ID = 0 task.Task = "stop_edgeapp" task.Args = sql.NullString{String: fmt.Sprintf("{\"id\": \"%s\"}", c.Args().First()), Valid: true} - task.Status = string(tasks.STATUS_CREATED) + task.Status = fmt.Sprintf("%d", tasks.STATUS_CREATED) task.Created = currentFormattedTime task.Updated = currentFormattedTime task = tasks.ExecuteTask(task)