-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Description
In the doc page for type Decode, located:
https://pkg.go.dev/github.com/openrdap/rdap#Decoder
it says 👍
result, err := d.Decode()
if err != nil {
if domain, ok := result.(*rdap.Domain); ok {
fmt.Printf("Domain name = %s\n", domain.LDHName)
}
}
I know this is just sample code (and thanks for having it there, it is exactly what I needed), but I think the err check is inverted. You want to go into the block and cast the result if the decode didn't have an error...if err == nil.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels