From c07a8d3f99e8f1d3230fcf3c76cae12f82467c48 Mon Sep 17 00:00:00 2001 From: parauliya Date: Tue, 5 May 2020 12:12:20 +0530 Subject: [PATCH] Changed the way of writing template and creating workflow --- grpc-server/workflow.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/grpc-server/workflow.go b/grpc-server/workflow.go index bb03e2492..db49d4028 100644 --- a/grpc-server/workflow.go +++ b/grpc-server/workflow.go @@ -273,11 +273,11 @@ func createYaml(ctx context.Context, sqlDB *sql.DB, temp string, tar string) (st func renderTemplate(tempData string, tarData []byte) (string, error) { type Target struct { - Hardware map[string]string `json:hardware` + Hardware map[string]interface{} } - var target Target - err := json.Unmarshal(tarData, &target) + target := Target{} + err := json.Unmarshal(tarData, &(target.Hardware)) if err != nil { logger.Error(err) return "", nil