Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Adds an endpoint to post cluster peers to #680

Merged
merged 1 commit into from
Aug 8, 2017
Merged

Conversation

replay
Copy link
Contributor

@replay replay commented Jul 6, 2017

No description provided.

@replay replay requested a review from woodsaj July 6, 2017 10:06
api/cluster.go Outdated
@@ -51,6 +51,41 @@ func (s *Server) getClusterStatus(ctx *middleware.Context) {
response.Write(ctx, response.NewJson(200, status, ""))
}

func (s *Server) postClusterMembers(ctx *middleware.Context, req models.ClusterMembers) {
memberNames := make(map[string]struct{})
toJoin := make([]string, 0)
Copy link
Contributor

@Dieterbe Dieterbe Jul 6, 2017

Choose a reason for hiding this comment

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

you don't need to pre-allocate slices. just declaring them is enough. len, range, etc will work fine. (annoyingly the same can't be said about maps)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thx, fixing

@Dieterbe
Copy link
Contributor

LGTM now. @replay shall i merge?

@replay
Copy link
Contributor Author

replay commented Aug 8, 2017

yes please @Dieterbe

@Dieterbe Dieterbe merged commit e55d3ec into master Aug 8, 2017
@Dieterbe Dieterbe deleted the cluster_peer_route branch September 18, 2018 09:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants