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

refactor: Remove "Opts" abbreviation #92

Merged
merged 2 commits into from
Jan 30, 2022
Merged

refactor: Remove "Opts" abbreviation #92

merged 2 commits into from
Jan 30, 2022

Conversation

kylecarbs
Copy link
Member

Having a mixture of abbreviations in the codebase reduces
clarity. Although opts is common for options, I'd rather
set a precedent of clarifying verbosity.

@kylecarbs kylecarbs self-assigned this Jan 30, 2022
@codecov
Copy link

codecov bot commented Jan 30, 2022

Codecov Report

Merging #92 (a08a422) into main (f9e594f) will increase coverage by 2.75%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #92      +/-   ##
==========================================
+ Coverage   68.84%   71.60%   +2.75%     
==========================================
  Files          85       89       +4     
  Lines        3396     3578     +182     
  Branches       55       55              
==========================================
+ Hits         2338     2562     +224     
+ Misses        861      793      -68     
- Partials      197      223      +26     
Flag Coverage Δ
unittest-go-macos-latest 67.35% <100.00%> (+0.17%) ⬆️
unittest-go-ubuntu-latest 69.42% <100.00%> (?)
unittest-go-windows-latest 67.04% <100.00%> (?)
unittest-js 78.30% <ø> (ø)
Impacted Files Coverage Δ
peer/channel.go 87.19% <100.00%> (+2.43%) ⬆️
peer/conn.go 74.69% <100.00%> (+0.30%) ⬆️
peerbroker/dial.go 72.72% <100.00%> (ø)
peerbroker/listen.go 80.46% <100.00%> (ø)
database/postgres/postgres.go 70.00% <0.00%> (ø)
provisioner/terraform/provision.go 57.62% <0.00%> (ø)
provisioner/terraform/serve.go 66.66% <0.00%> (ø)
provisioner/terraform/parse.go 75.00% <0.00%> (ø)
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f9e594f...a08a422. Read the comment docs.

Having a mixture of abbreviations in the codebase reduces
clarity. Although opts is common for options, I'd rather
set a precedent of clarifying verbosity.
Copy link
Contributor

@bryphe-coder bryphe-coder left a comment

Choose a reason for hiding this comment

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

I like it, thanks for improving the readability @kylecarbs !

@kylecarbs kylecarbs merged commit 3e88f15 into main Jan 30, 2022
@kylecarbs kylecarbs deleted the renameopts branch January 30, 2022 01:27
@@ -27,7 +27,7 @@ const (
// The initialization overrides listener handles, and detaches
// the channel on open. The datachannel should not be manually
// mutated after being passed to this function.
func newChannel(conn *Conn, dc *webrtc.DataChannel, opts *ChannelOpts) *Channel {
func newChannel(conn *Conn, dc *webrtc.DataChannel, opts *ChannelOptions) *Channel {
Copy link
Contributor

Choose a reason for hiding this comment

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

consider following up with a ruleguard linter rule that checks that types don't end in Opts, and suggesting Options instead

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.

None yet

3 participants