Skip to content

Commit 7eb0598

Browse files
authored
Fix regression with %w verb (#278)
The %w fmt verb for errors isn't valid for older versions of Go.
1 parent 945cdf3 commit 7eb0598

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

search.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ func (l *Conn) Search(searchRequest *SearchRequest) (*SearchResult, error) {
397397
for _, child := range packet.Children[2].Children {
398398
decodedChild, err := DecodeControl(child)
399399
if err != nil {
400-
return result, fmt.Errorf("failed to decode child control: %w", err)
400+
return result, fmt.Errorf("failed to decode child control: %s", err)
401401
}
402402
result.Controls = append(result.Controls, decodedChild)
403403
}

v3/search.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ func (l *Conn) Search(searchRequest *SearchRequest) (*SearchResult, error) {
397397
for _, child := range packet.Children[2].Children {
398398
decodedChild, err := DecodeControl(child)
399399
if err != nil {
400-
return result, fmt.Errorf("failed to decode child control: %w", err)
400+
return result, fmt.Errorf("failed to decode child control: %s", err)
401401
}
402402
result.Controls = append(result.Controls, decodedChild)
403403
}

0 commit comments

Comments
 (0)