From ed381227527cd0a15645d73ec906fc46d9a05320 Mon Sep 17 00:00:00 2001 From: Alexey Khit Date: Tue, 25 Jul 2023 18:05:29 +0300 Subject: [PATCH] Code refactoring --- pkg/shell/shell.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/shell/shell.go b/pkg/shell/shell.go index 719c0e68..d24b880a 100644 --- a/pkg/shell/shell.go +++ b/pkg/shell/shell.go @@ -44,6 +44,7 @@ func QuoteSplit(s string) []string { return a } +// ReplaceEnvVars - support format ${CAMERA_PASSWORD} and ${RTSP_USER:admin} func ReplaceEnvVars(text string) string { re := regexp.MustCompile(`\${([^}{]+)}`) return re.ReplaceAllStringFunc(text, func(match string) string {