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

embed: use '*url.URL.Hostname(),Port()' for Go 1.8 #7766

Merged
merged 1 commit into from
Apr 18, 2017
Merged

Conversation

gyuho
Copy link
Contributor

@gyuho gyuho commented Apr 18, 2017

Wherever net.SplitHostPort is used and we don't care about the parsing error, we can just use the new methods Hostname and Port that strip out the port or hostname.

https://golang.org/doc/go1.8#net_url

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
@gyuho gyuho mentioned this pull request Apr 18, 2017
26 tasks
@gyuho gyuho merged commit 30552e2 into etcd-io:master Apr 18, 2017
@gyuho gyuho deleted the url branch April 18, 2017 20:16
@codecov-io
Copy link

Codecov Report

Merging #7766 into master will decrease coverage by 0.19%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #7766     +/-   ##
=========================================
- Coverage   76.05%   75.85%   -0.2%     
=========================================
  Files         331      331             
  Lines       26053    26065     +12     
=========================================
- Hits        19814    19772     -42     
- Misses       4821     4869     +48     
- Partials     1418     1424      +6
Impacted Files Coverage Δ
etcdserver/raft.go 88.39% <100%> (+0.24%) ⬆️
embed/config.go 70.48% <100%> (ø) ⬆️
etcdserver/server.go 80.25% <100%> (+0.36%) ⬆️
proxy/grpcproxy/register.go 80.55% <0%> (-13.89%) ⬇️
pkg/adt/interval_tree.go 77.74% <0%> (-11.9%) ⬇️
pkg/fileutil/purge.go 73.68% <0%> (-7.9%) ⬇️
auth/simple_token.go 86.79% <0%> (-6.61%) ⬇️
proxy/grpcproxy/watch.go 89.58% <0%> (-4.87%) ⬇️
pkg/testutil/recorder.go 66.66% <0%> (-3.71%) ⬇️
etcdserver/api/v3rpc/lease.go 96.42% <0%> (-3.58%) ⬇️
... and 13 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 94044ce...f10a704. Read the comment docs.

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.

3 participants