請考慮以下接口定義:package reposimport ( resources "unit/pkg/resources")type IRepo interface { fetch(int32) (resources.IResource, error) update(resources.IResource) (resources.IResource, error) new() resources.IResource create(resources.IResource) (resources.IResource, error) delete(int32) error}有沒有辦法“使用”導入的包(在C++命名空間的意義上),這樣我就不需要每次引用其中一種類型(IResource)(TBH - 這可能只是意味著屬于包而不是IResourcereposresources)
是否可以在不使用點表示法的情況下引用導入的類型
慕桂英3389331
2022-09-12 20:55:26