Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(247)

Issue 7668045: Add GetEndpoints to the API.

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 1 month ago by bac
Modified:
11 years, 1 month ago
Reviewers:
dimitern, mp+154843, TheMue
Visibility:
Public.

Description

Add GetEndpoints to the API. https://code.launchpad.net/~bac/juju-core/get-endpoints/+merge/154843 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : Add GetEndpoints to the API. #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+252 lines, -0 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M state/api/apiclient.go View 1 chunk +11 lines, -0 lines 0 comments Download
M state/api/params/params.go View 1 chunk +20 lines, -0 lines 2 comments Download
M state/apiserver/api_test.go View 1 3 chunks +159 lines, -0 lines 3 comments Download
M state/apiserver/apiserver.go View 1 1 chunk +60 lines, -0 lines 2 comments Download

Messages

Total messages: 3
bac
Please take a look.
11 years, 1 month ago (2013-03-22 14:08:39 UTC) #1
dimitern
LGTM modulo the suggestions below. https://codereview.appspot.com/7668045/diff/2001/state/api/params/params.go File state/api/params/params.go (right): https://codereview.appspot.com/7668045/diff/2001/state/api/params/params.go#newcode152 state/api/params/params.go:152: // of service names ...
11 years, 1 month ago (2013-03-22 14:52:01 UTC) #2
TheMue
11 years, 1 month ago (2013-03-22 16:10:17 UTC) #3
Mostly OK, only the nested maps should be changed into nested structs.

https://codereview.appspot.com/7668045/diff/2001/state/api/params/params.go
File state/api/params/params.go (right):

https://codereview.appspot.com/7668045/diff/2001/state/api/params/params.go#n...
state/api/params/params.go:168: Endpoints
map[string]map[string][]map[string]string
Even if it is more typing upfront I would like nested structs here more.

https://codereview.appspot.com/7668045/diff/2001/state/apiserver/api_test.go
File state/apiserver/api_test.go (right):

https://codereview.appspot.com/7668045/diff/2001/state/apiserver/api_test.go#...
state/apiserver/api_test.go:1365: results := map[string][]map[string]string{
Here get's obvious how a struct would be more direct and clear.

https://codereview.appspot.com/7668045/diff/2001/state/apiserver/api_test.go#...
state/apiserver/api_test.go:1449: func normalize(r
map[string]map[string][]map[string]string)
map[string]map[string]map[string]map[string]string {
Again the nested map making it difficult to follow. If it has to be done this
way at least a type representing those nested maps would help to make it more
readable (but still prefer structs).
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b