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

Improve DataChannel.Detach() docstring #2969

Merged
merged 1 commit into from
Dec 13, 2024
Merged

Improve DataChannel.Detach() docstring #2969

merged 1 commit into from
Dec 13, 2024

Conversation

WofWca
Copy link
Member

@WofWca WofWca commented Dec 12, 2024

Description

It wasn't clear (at least to me)
what "idiomatic API" it's referring to.

But, judging from the data-channels-detach example comments,
this is what it's made for.

// data-channels-detach is an example that shows how you can detach a data channel. This allows direct access the underlying [pion/datachannel](https://github.com/pion/datachannel). This allows you to interact with the data channel using a more idiomatic API based on the `io.ReadWriteCloser` interface.

Reference issue

None.

It wasn't clear (at least to me)
what "idiomatic API" it's referring to.

But, judging from the `data-channels-detach` example comments,
this is what it's made for.
https://github.com/pion/webrtc/blob/f29ef99b220beb906c60e7f1aebac6c02498daf9/examples/data-channels-detach/main.go#L4
Copy link

codecov bot commented Dec 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.64%. Comparing base (233526d) to head (d339643).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2969      +/-   ##
==========================================
- Coverage   77.66%   77.64%   -0.02%     
==========================================
  Files          89       89              
  Lines       10517    10517              
==========================================
- Hits         8168     8166       -2     
- Misses       1856     1857       +1     
- Partials      493      494       +1     
Flag Coverage Δ
go 79.19% <ø> (-0.03%) ⬇️
wasm 63.56% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@WofWca WofWca marked this pull request as ready for review December 12, 2024 10:23
@WofWca
Copy link
Member Author

WofWca commented Dec 12, 2024

The commit linter thing probably complains about the link.

@Sean-Der
Copy link
Member

Thank you @WofWca it is very considerate of you to update these docs. Code changes usually benefit the author, but you are doing this just to teach others :)

thank you!

@Sean-Der Sean-Der merged commit 1c4bc79 into master Dec 13, 2024
18 of 20 checks passed
@Sean-Der Sean-Der deleted the clarify-detach branch December 13, 2024 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants