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

feat: improve plugin preload logic #6576

Merged
merged 1 commit into from
Aug 28, 2019
Merged

feat: improve plugin preload logic #6576

merged 1 commit into from
Aug 28, 2019

Conversation

Stebalien
Copy link
Member

  • Allow '*' meaning "load all plugins".
  • Expose a Preload function that users can call.

* Allow '*' meaning "load all plugins".
* Expose a Preload function that users can call.
Copy link
Contributor

@aschmahmann aschmahmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good, although I'm a bit confused as to why we want a public Preload function now? It says it should only be called during init, if it's the private init() in loader.go then what use is having a public function?

@Stebalien
Copy link
Member Author

https://medium.com/golangspec/init-functions-in-go-eac191b3860a

The idea is to allow users consuming go-ipfs as a library to preload their own plugins.

@Stebalien Stebalien merged commit ad4f02c into master Aug 28, 2019
@Stebalien Stebalien deleted the feat/easier-preload branch August 28, 2019 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants