refactor: enhance code clarity and maintainability across multiple files

- Updated comments to improve clarity and adhere to best practices in ascii.go, main.go, and diagnostics.
- Removed unnecessary linter directives for improved readability in imaging.go and ptz.go.
- Reformatted function signatures and added helper calls in tests for consistency and clarity.
- Enhanced error handling and logging consistency in various server files, ensuring better maintainability.
This commit is contained in:
0x524a
2025-12-02 22:21:20 -05:00
parent c1daba5be6
commit 02f79ea7a7
12 changed files with 70 additions and 56 deletions
+2 -2
View File
@@ -42,14 +42,14 @@ type Fault struct {
// Security represents WS-Security header.
type Security struct {
XMLName xml.Name `xml:"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd Security"`
XMLName xml.Name `xml:"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd Security"` //nolint:lll // Long XML namespace
MustUnderstand string `xml:"http://www.w3.org/2003/05/soap-envelope mustUnderstand,attr,omitempty"`
UsernameToken *UsernameToken `xml:"UsernameToken,omitempty"`
}
// UsernameToken represents a WS-Security username token.
type UsernameToken struct {
XMLName xml.Name `xml:"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd UsernameToken"`
XMLName xml.Name `xml:"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd UsernameToken"` //nolint:lll // Long XML namespace
Username string `xml:"Username"`
Password Password `xml:"Password"`
Nonce Nonce `xml:"Nonce"`