From caac77607646550af976f2730d16f68ba259f039 Mon Sep 17 00:00:00 2001 From: Tracy Li Date: Fri, 10 Aug 2018 12:48:33 -0500 Subject: [PATCH] Fix the issue that have problem to replace decoded value back to app json --- app/config.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/config.go b/app/config.go index f923701..81a9b32 100644 --- a/app/config.go +++ b/app/config.go @@ -9,8 +9,9 @@ import ( "github.com/TIBCOSoftware/flogo-lib/core/action" "github.com/TIBCOSoftware/flogo-lib/core/data" "github.com/TIBCOSoftware/flogo-lib/core/trigger" - "regexp" "io/ioutil" + "regexp" + "strings" ) // App is the configuration for the App @@ -94,8 +95,8 @@ func preprocessConfig(appJson []byte) ([]byte, error) { if err != nil { return nil, err } - mreg := regexp.MustCompile(string(match)) - appJson = mreg.ReplaceAll([]byte(appJson), []byte(decodedValue)) + appstring := strings.Replace(string(appJson), string(match), decodedValue, -1) + appJson = []byte(appstring) } return appJson, nil