ONVIF code refactoring

This commit is contained in:
Alexey Khit
2023-05-05 10:01:59 +03:00
parent 083ec127fd
commit 4fe078c7c0
3 changed files with 12 additions and 14 deletions
+2
View File
@@ -15,6 +15,8 @@ import (
"time" "time"
) )
const PathDevice = "/onvif/device_service"
type Client struct { type Client struct {
url *url.URL url *url.URL
-4
View File
@@ -9,10 +9,6 @@ import (
"time" "time"
) )
const (
PathDevice = "/onvif/device_service"
)
func FindTagValue(b []byte, tag string) string { func FindTagValue(b []byte, tag string) string {
re := regexp.MustCompile(`<[^/>]*` + tag + `[^>]*>([^<]+)`) re := regexp.MustCompile(`<[^/>]*` + tag + `[^>]*>([^<]+)`)
m := re.FindSubmatch(b) m := re.FindSubmatch(b)