Empty string test can be improved CRT-A0004
Anti-pattern
Major
1 occurrence in this check
replace len(s) == 0 with s == ""
80
81// StringToBytes converts string to slice of bytes without copy.
82func StringToBytes(s string) []byte {
83	if len(s) == 0 {84		return nil
85	}
86	return unsafe.Slice(unsafe.StringData(s), len(s))