update regex to capature comment

This commit is contained in:
Maidul Islam
2023-02-08 18:48:45 -08:00
parent 9a22975732
commit a685ac3e73
+1 -1
View File
@@ -474,7 +474,7 @@ func generateExampleEnv(cmd *cobra.Command, args []string) {
listOfKeyValue := []string{} listOfKeyValue := []string{}
for _, secret := range secretDetails.Secrets { for _, secret := range secretDetails.Secrets {
re := regexp.MustCompile(`(.*)DEFAULT:(.*)`) re := regexp.MustCompile(`(?s)(.*)DEFAULT:(.*)`)
match := re.FindStringSubmatch(secret.Comment) match := re.FindStringSubmatch(secret.Comment)
defaultValue := "" defaultValue := ""
comment := secret.Comment comment := secret.Comment