Keyboard Shortcuts

File
u :up to issue
m :publish + mail comments
M :edit review message
j / k :jump to file after / before current file
J / K :jump to next file with a comment after / before current file
Side-by-side diff
i :toggle intra-line diffs
e :expand all comments
c :collapse all comments
s :toggle showing all comments
n / p :next / previous diff chunk or comment
N / P :next / previous comment
<Up> / <Down> :next / previous line
<Enter> :respond to / edit current comment
d :mark current comment as done
Issue
u :up to list of issues
m :publish + mail comments
j / k :jump to patch after / before current patch
o / <Enter> :open current patch in side-by-side view
i :open current patch in unified diff view
Issue List
j / k :jump to issue after / before current issue
o / <Enter> :open current issue
# : close issue
Comment/message editing
<Ctrl> + s or <Ctrl> + Enter :save comment
<Esc> :cancel edit
Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(160)
Issues Repositories Search
Open Issues | Closed Issues | All Issues | Sign in with your Google Account to create issues and add comments

Issue 77410043: instance: add HostPort type

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 9 months ago by rog
Modified:
11 years, 9 months ago
Reviewers:
gz , mp+211525
Visibility:
Public.
instance: add HostPort type We want this to return it from the API, amongst other places. https://code.launchpad.net/~rogpeppe/juju-core/522-instance-hostport/+merge/211525 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : instance: add HostPort type #

Total comments: 4
Created: 11 years, 9 months ago
Download [raw] [tar.bz2]
Unified diffs Side-by-side diffs Delta from patch set Stats (+66 lines, -0 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M instance/address.go View 2 chunks +26 lines, -0 lines 3 comments Download
M instance/address_test.go View 2 chunks +38 lines, -0 lines 1 comment Download
Total messages: 4
|
rog
Please take a look.
11 years, 9 months ago (2014年03月18日 13:33:36 UTC) #1
Please take a look.
Sign in to reply to this message.
gz
LGTM. https://codereview.appspot.com/77410043/diff/20001/instance/address.go File instance/address.go (right): https://codereview.appspot.com/77410043/diff/20001/instance/address.go#newcode55 instance/address.go:55: hps[i] = HostPort{ Oh, interesting, I've been using ...
11 years, 9 months ago (2014年03月18日 14:01:32 UTC) #2
LGTM.
https://codereview.appspot.com/77410043/diff/20001/instance/address.go
File instance/address.go (right):
https://codereview.appspot.com/77410043/diff/20001/instance/address.go#newcode55
instance/address.go:55: hps[i] = HostPort{
Oh, interesting, I've been using append to do this stuff rather than assigning
to an index.
https://codereview.appspot.com/77410043/diff/20001/instance/address.go#newcode66
instance/address.go:66: return net.JoinHostPort(hp.Value,
strconv.FormatInt(int64(hp.Port), 10))
I giggle at the dance to turn an int into a string.
https://codereview.appspot.com/77410043/diff/20001/instance/address_test.go
File instance/address_test.go (right):
https://codereview.appspot.com/77410043/diff/20001/instance/address_test.go#n...
instance/address_test.go:271: expect: "[2001:DB8::1]:100",
Yeay, ipv6.
Sign in to reply to this message.
rog
https://codereview.appspot.com/77410043/diff/20001/instance/address.go File instance/address.go (right): https://codereview.appspot.com/77410043/diff/20001/instance/address.go#newcode66 instance/address.go:66: return net.JoinHostPort(hp.Value, strconv.FormatInt(int64(hp.Port), 10)) On 2014年03月18日 14:01:32, gz wrote: ...
11 years, 9 months ago (2014年03月18日 15:11:02 UTC) #3
https://codereview.appspot.com/77410043/diff/20001/instance/address.go
File instance/address.go (right):
https://codereview.appspot.com/77410043/diff/20001/instance/address.go#newcode66
instance/address.go:66: return net.JoinHostPort(hp.Value,
strconv.FormatInt(int64(hp.Port), 10))
On 2014年03月18日 14:01:32, gz wrote:
> I giggle at the dance to turn an int into a string.
fmt.Sprint(hp.Port) would have been shorter, but I didn't really want to depend
on fmt here.
Sign in to reply to this message.
rog
On 2014年03月18日 15:11:02, rog wrote: > https://codereview.appspot.com/77410043/diff/20001/instance/address.go > File instance/address.go (right): > > https://codereview.appspot.com/77410043/diff/20001/instance/address.go#newcode66 > ...
11 years, 9 months ago (2014年03月18日 15:11:49 UTC) #4
On 2014年03月18日 15:11:02, rog wrote:
> https://codereview.appspot.com/77410043/diff/20001/instance/address.go
> File instance/address.go (right):
> 
>
https://codereview.appspot.com/77410043/diff/20001/instance/address.go#newcode66
> instance/address.go:66: return net.JoinHostPort(hp.Value,
> strconv.FormatInt(int64(hp.Port), 10))
> On 2014年03月18日 14:01:32, gz wrote:
> > I giggle at the dance to turn an int into a string.
> 
> fmt.Sprint(hp.Port) would have been shorter, but I didn't really want to
depend
> on fmt here.
ha, colour me stupid. strconv.Itoa is considerably better here.
Sign in to reply to this message.
|
Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b

AltStyle によって変換されたページ (->オリジナル) /