良いか悪いかといったら、どう考えても悪い。
package main
import (
"fmt"
)
type text struct {
text string
}
func main() {
var a string
a = fmt.Sprint(nil)
fmt.Println(a)
fmt.Println(a == "nil")
//fmt.Println(a == nil) //invalid operation: a == nil (mismatched types string and nil)
var t text
t.text = fmt.Sprint(nil)
fmt.Println(t.text)
fmt.Println(t.text == "nil")
// fmt.Println(t == nil) // invalid operation: t == nil (mismatched types text and nil)
}