Often happens in relational database, that when selecting records from the database, the field is returned. Go does not process strings and numbers as nil, in this case there is an auxiliary type of sql.Null {type} But if you return data in json format, then use of this type becomes unnecessary since, in javascript, there is null.
Now I sql.NullString convert to manual. Also there is a variant in sql itself to return, not null, and an empty line (if it is a line), but for some reasons in the future it will be difficult to debug.
How do you solve this problem?