Skip to content
This repository was archived by the owner on Jun 27, 2023. It is now read-only.

allow for overriding source package #529

Closed
wants to merge 2 commits into from

Conversation

choo-stripe
Copy link

Greetings!

We call mockgen from bazel, which lives in a hermetic environment and doesn't have access to go modules or GOPATH. However, we shouldn't really need to magically find the name of the go package.

This PR adds a flag to override the source package - so that if the mock file needs to import from the original file, it'll use the provided package.

I looked at writing tests. I didn't put this in parsePackageImport because that function is called in multiple places, including to determine the destination path. We don't want to override the destination path. I thought about creating a new function, getPackageName or something, but it didn't seem worthwhile.

@choo-stripe choo-stripe requested a review from codyoss as a code owner February 24, 2021 18:31
@codyoss
Copy link
Member

codyoss commented Feb 24, 2021

@choo-stripe Would you please open a feature request for this PR. We like to have discussion before implementing any features.

@choo-stripe
Copy link
Author

Done: #531

@codyoss
Copy link
Member

codyoss commented Apr 16, 2021

Closing in favor of #547

@codyoss codyoss closed this Apr 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy