Fix

"interface conversion: X is not Y" in Go

Fix the 'interface conversion' panic in Go by using the comma-ok idiom to safely check types before asserting them.

The "interface conversion: X is not Y" panic occurs because you are asserting that an interface holds a specific concrete type, but it actually holds a different type or nil. Use a type assertion with the comma-ok idiom to safely check the type before using it.

if v, ok := x.(TargetType); ok {
    // Use v safely here
} else {
    // Handle the error or fallback case
}