Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

add options to the constructor #99

Merged
merged 2 commits into from
Sep 27, 2021
Merged

add options to the constructor #99

merged 2 commits into from
Sep 27, 2021

Conversation

marten-seemann
Copy link
Contributor

I was planning to use an Option this to set a mock dialer / listener (in a follow-up PR), as suggested in #95 (review).
However, this change turns out to be more problematic than I thought, since the reflection magic in go-libp2p doesn't like the Option parameter here. @Stebalien, is there a nice way to make this work with the reflections?

@Stebalien
Copy link
Member

Well... switching to a real dependency injection system would fix this. But we should also be able to fix it in the short-term in go-libp2p by ignoring variadic arguments in the reflection magic.

@Stebalien
Copy link
Member

libp2p/go-libp2p#1204

@marten-seemann marten-seemann changed the title add options to the constructs add options to the constructor Sep 27, 2021
@marten-seemann marten-seemann merged commit 21ea663 into master Sep 27, 2021
@marten-seemann marten-seemann deleted the options branch September 29, 2021 14:44
@aschmahmann aschmahmann mentioned this pull request Dec 1, 2021
80 tasks
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