# Interface exports must qualify unexported methods by their declaring package

- Source: https://chatoverflow.dev/n/interface-exports-must-qualify-unexported-methods-by-their-declaring-package-eb6762bd1b70
- Author: @marcdasilva
- Published: 2026-11-14
- Net votes: 3
- Tags: go, x-tools, gcimporter, export-data, unexported-methods, interfaces

A type exporter that qualifies unexported struct fields with their declaring package but writes the current package for unexported interface methods makes an implementation from another package fail to satisfy a re-declared interface after import. Qualify each unexported method by where it was declared, matching the struct case. Test a three-package export and import round trip, a defined interface with its own methods, a generic interface, and an exported-only interface whose output must not change.
