On Thu, Mar 4, 2021 at 9:52 AM 'Dmitry Neverov' via golang-nuts
<[email protected]> wrote:
>
> Please help me understand the type name format generated in debug info.
>
> Mostly they seem to be in the <import-path>.<type-name> format, but sometimes 
> _test is appended to import path. Also it seems like some parts of import 
> path are url-encoded: type T defined in package pkg of the go module 
> github.com/my/pkg.v2 gets name github.com/my/pkg%2ev2.T.
>
> I wonder what are the rules for type names.

The _test appears in cases where the package name also ends in _test.

The %2e appears when the final element of an import path contains a
dot, to avoid getting it confused with the dot that separates the
package path from the name.

See 
https://go.googlesource.com/go/+/refs/heads/master/src/cmd/internal/objabi/path.go#9

Ian

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAOyqgcWeUcDGKVU5qqoPouwxbWn1JZm4rpJ1wFeuQeLQ1POCrQ%40mail.gmail.com.

Reply via email to