refactor: improve code readability and maintainability across multiple files
- Reformatted function signatures for better clarity in media.go and onvif-quick/main.go. - Replaced hardcoded values with constants in ascii.go and server/imaging.go for improved maintainability. - Enhanced error handling and logging consistency in onvif-diagnostics/main.go and server/server.go. - Updated comments to clarify functionality and ensure adherence to ONVIF specifications across various files.
This commit is contained in:
+4
-4
@@ -266,12 +266,12 @@ func (s *Server) HandleGetServices(body interface{}) (interface{}, error) {
|
||||
{
|
||||
Namespace: "http://www.onvif.org/ver10/device/wsdl",
|
||||
XAddr: baseURL + "/device_service",
|
||||
Version: Version{Major: 2, Minor: 5},
|
||||
Version: Version{Major: 2, Minor: 5}, //nolint:mnd // ONVIF version
|
||||
},
|
||||
{
|
||||
Namespace: "http://www.onvif.org/ver10/media/wsdl",
|
||||
XAddr: baseURL + "/media_service",
|
||||
Version: Version{Major: 2, Minor: 5},
|
||||
Version: Version{Major: 2, Minor: 5}, //nolint:mnd // ONVIF version
|
||||
},
|
||||
}
|
||||
|
||||
@@ -279,7 +279,7 @@ func (s *Server) HandleGetServices(body interface{}) (interface{}, error) {
|
||||
services = append(services, Service{
|
||||
Namespace: "http://www.onvif.org/ver20/ptz/wsdl",
|
||||
XAddr: baseURL + "/ptz_service",
|
||||
Version: Version{Major: 2, Minor: 5},
|
||||
Version: Version{Major: 2, Minor: 5}, //nolint:mnd // ONVIF version
|
||||
})
|
||||
}
|
||||
|
||||
@@ -287,7 +287,7 @@ func (s *Server) HandleGetServices(body interface{}) (interface{}, error) {
|
||||
services = append(services, Service{
|
||||
Namespace: "http://www.onvif.org/ver20/imaging/wsdl",
|
||||
XAddr: baseURL + "/imaging_service",
|
||||
Version: Version{Major: 2, Minor: 5},
|
||||
Version: Version{Major: 2, Minor: 5}, //nolint:mnd // ONVIF version
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user