refactor: introduce constants for improved maintainability in tests and server configurations
- Added constants for test endpoints, usernames, and XML headers in client_test.go and device_certificates_test.go to enhance readability and reduce hardcoded values. - Updated various test cases to utilize these constants, ensuring consistency across tests. - Refactored imaging settings and server configurations to use defined constants for default values, improving clarity and maintainability in server/device.go and server/imaging.go. - Enhanced comments throughout the code to clarify functionality and adhere to best practices.
This commit is contained in:
+3
-3
@@ -377,12 +377,12 @@ func (s *Server) HandleGetOptions(body interface{}) (interface{}, error) {
|
||||
},
|
||||
WideDynamicRange: &WideDynamicRangeOptions{
|
||||
Mode: []string{"OFF", "ON"},
|
||||
Level: &FloatRange{Min: 0, Max: 100},
|
||||
Level: &FloatRange{Min: 0, Max: 100}, //nolint:mnd // Imaging parameter range
|
||||
},
|
||||
WhiteBalance: &WhiteBalanceOptions{
|
||||
Mode: []string{"AUTO", "MANUAL"},
|
||||
YrGain: &FloatRange{Min: 0, Max: 255},
|
||||
YbGain: &FloatRange{Min: 0, Max: 255},
|
||||
YrGain: &FloatRange{Min: 0, Max: 255}, //nolint:mnd // White balance gain range
|
||||
YbGain: &FloatRange{Min: 0, Max: 255}, //nolint:mnd // White balance gain range
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user