Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose some useful type/func to pkg to be called by external Go modules #336

Merged
merged 14 commits into from
Jan 18, 2023

Conversation

magodo
Copy link
Collaborator

@magodo magodo commented Jan 17, 2023

This PR exposes following types/functions to pkg to be able to be depended by external Go modules, but with no compatibility guarantees at this moment. This is mainly to be depended by another internal project for now:

  • pkg/conifg: The configuration type Config
  • pkg/log: The type and function for setting up logger
  • pkg/meta: The main interface Meta and its builder function

Besides, this PR adds following fixes/enhancements:

  • Fix a bug introduced due to using os.Chdir in acctest
  • Removes the use of f.Sync (because of above fix), which is not a right thing to do
  • Improve the ParallelImport to allow a list longer than parallelism
  • New NonInteractiveModeConfig and InteractiveModeConfig to better reason about the configurations given the Config is exported, we put (non)interactive related config to these new types on top of Config, which should not be exported to external users
  • The methods of Meta now accepts context.Context

@magodo magodo changed the title Expose some useful type/func to pkg to be able to called by external Go modules Expose some useful type/func to pkg to be called by external Go modules Jan 17, 2023
@magodo magodo requested a review from ms-henglu January 17, 2023 08:49
@magodo magodo added refactor enhancement New feature or request and removed enhancement New feature or request labels Jan 17, 2023
@magodo magodo merged commit c1805ba into Azure:main Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants