package service import ( "context" "practice_Go/api/v1/ebooks" ) type ( IEbooks interface { GetEbooksList(ctx context.Context, req *ebooks.GetEbooksListReq) (res ebooks.GetEbooksListRes, err error) } ) var ( localBooks IEbooks ) func Ebooks() IEbooks { if localBooks == nil { panic("implement not found for interface IUser, forgot register?") } return localBooks } func RegisterEbooks(i IEbooks) { localBooks = i }