Skip to content

Commit

Permalink
Fix the issue that have problem to replace decoded value back to app …
Browse files Browse the repository at this point in the history
…json
  • Loading branch information
lixingwang committed Aug 10, 2018
1 parent 0cdd532 commit caac776
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit caac776

Please sign in to comment.