-
Notifications
You must be signed in to change notification settings - Fork 30
reduce dependencies #44
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because that is the whole point of libraries. The compiler will do the right thing and only pull in what is actually needed. These atom types will most likely be used more and more as we lean on goquery over regex.
If you really want to remove all these, you can just remove that whole block. It appears that the goquery library is actually adding the \n for us. I left that code in case we found that it doesn't work in some cases as it seemed odd that the library has that side-effect.
|
I don't see why we should remove the whole block though instead of what I did with this PR. Let me know what you think :) |
|
I'm fine with this change going in. I'd request that you put a comment above the const with the link to the doc you linked above. It'll make it easier to understand where we picked a random 0x202 :D |
|
Good point! Totally agree. |
|
Kudos, SonarCloud Quality Gate passed!
|
Codecov Report
@@ Coverage Diff @@
## main #44 +/- ##
=======================================
Coverage 13.25% 13.25%
=======================================
Files 13 13
Lines 1803 1803
=======================================
Hits 239 239
Misses 1556 1556
Partials 8 8
Continue to review full report at Codecov.
|








We were importing a few libs just because of a single constant value, instead, why not use the value directly?
From https://pkg.go.dev/golang.org/x/net/html/atom
Br= 0x202