@@ -925,7 +925,7 @@ func (c *Client) waitForLockRelease(ctx context.Context, target string) error {
925925 if err == nil && res .OK {
926926 // Lock acquired, release it immediately to verify availability
927927 // Note: ignoring unlock errors is intentional - we proved lock availability
928- _ , _ = c .Unlock (ctx , target )
928+ _ , _ = c .Unlock (ctx , target ) //nolint:errcheck // Intentional: verifying lock availability only
929929
930930 c .logger .Info ("NETCONF lock acquired" ,
931931 "target" , target )
@@ -953,7 +953,7 @@ func (c *Client) reconnect() error {
953953
954954 // Close existing connection (ignore errors - connection may already be broken)
955955 if c .driver != nil {
956- _ = c .driver .Close () // Explicitly ignore error (connection likely already broken)
956+ _ = c .driver .Close () //nolint:errcheck // Explicitly ignore error (connection likely already broken)
957957 c .driver = nil
958958 }
959959
@@ -1068,7 +1068,7 @@ func (c *Client) sendRPC(ctx context.Context, req *Req) (Res, error) {
10681068 // Check context before attempt
10691069 select {
10701070 case <- ctx .Done ():
1071- return Res {}, fmt .Errorf ("operation cancelled : %w" , ctx .Err ())
1071+ return Res {}, fmt .Errorf ("operation canceled : %w" , ctx .Err ())
10721072 default :
10731073 }
10741074
@@ -1204,7 +1204,7 @@ func (c *Client) sendRPC(ctx context.Context, req *Req) (Res, error) {
12041204
12051205 select {
12061206 case <- ctx .Done ():
1207- return Res {}, fmt .Errorf ("operation cancelled during backoff: %w" , ctx .Err ())
1207+ return Res {}, fmt .Errorf ("operation canceled during backoff: %w" , ctx .Err ())
12081208 case <- time .After (delay ):
12091209 // Continue to next retry
12101210 }
@@ -1462,25 +1462,25 @@ func (c *Client) buildEditConfigXML(req *Req) string {
14621462 xml := "<edit-config></edit-config>"
14631463
14641464 // Target datastore (as empty element: <candidate/>, <running/>, etc.)
1465- xml , _ = xmldot .SetRaw (xml , "edit-config.target" , "<" + req .Target + "/>" )
1465+ xml , _ = xmldot .SetRaw (xml , "edit-config.target" , "<" + req .Target + "/>" ) //nolint:errcheck // XML building errors caught during validation
14661466
14671467 // Default operation (optional) - xmldot automatically escapes the value
14681468 if req .DefaultOperation != "" {
1469- xml , _ = xmldot .Set (xml , "edit-config.default-operation" , req .DefaultOperation )
1469+ xml , _ = xmldot .Set (xml , "edit-config.default-operation" , req .DefaultOperation ) //nolint:errcheck // XML building errors caught during validation
14701470 }
14711471
14721472 // Test option (optional) - xmldot automatically escapes the value
14731473 if req .TestOption != "" {
1474- xml , _ = xmldot .Set (xml , "edit-config.test-option" , req .TestOption )
1474+ xml , _ = xmldot .Set (xml , "edit-config.test-option" , req .TestOption ) //nolint:errcheck // XML building errors caught during validation
14751475 }
14761476
14771477 // Error option (optional) - xmldot automatically escapes the value
14781478 if req .ErrorOption != "" {
1479- xml , _ = xmldot .Set (xml , "edit-config.error-option" , req .ErrorOption )
1479+ xml , _ = xmldot .Set (xml , "edit-config.error-option" , req .ErrorOption ) //nolint:errcheck // XML building errors caught during validation
14801480 }
14811481
14821482 // Config data (raw XML content)
1483- xml , _ = xmldot .SetRaw (xml , "edit-config.config" , req .Config )
1483+ xml , _ = xmldot .SetRaw (xml , "edit-config.config" , req .Config ) //nolint:errcheck // XML building errors caught during validation
14841484
14851485 return xml
14861486}
0 commit comments