ONVIF code refactoring
This commit is contained in:
@@ -15,6 +15,8 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const PathDevice = "/onvif/device_service"
|
||||||
|
|
||||||
type Client struct {
|
type Client struct {
|
||||||
url *url.URL
|
url *url.URL
|
||||||
|
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user