package widget import ( "context" ) type CreatorRepository interface { Create(ctx context.Context, userId int) (int, error) } func (service *Service) Create(ctx context.Context, userId int) (int, error) { widgetId, err := service.repository.Create(ctx, userId) if err != nil { return 0, err } return widgetId, nil }