GORM Playground Link

https://github.com/go-gorm/playground/pull/419

Description

I had a pretty simple custom type in GORM 1. I've been trying to use it in GORM 2 but I'm getting pretty nonsensical error message:

2021/12/17 18:39:59 /tmp/playground/main_test.go:69 cannot convert [49 46 50 46 51 46 52] to Inet

and none of the functions are even called

(and yes I tried pgtype stuff but its inet handling is a bit broken...)

Comment From: li-jin-gou

hello , you can use sql.NullString to solve it and it will help you to finish right type assert.