mirror of
https://github.com/AlexxIT/go2rtc.git
synced 2025-11-02 20:44:00 +08:00
Code refactoring
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user