Skip to content

Commit

Permalink
Merge pull request #8816 from gyuho/gofmt
Browse files Browse the repository at this point in the history
lease/leasehttp: use keyed fields in composite literals
  • Loading branch information
gyuho committed Nov 3, 2017
2 parents ef475b2 + 0048df6 commit 41d37fc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lease/leasehttp/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,12 @@ func RenewHTTP(ctx context.Context, id lease.LeaseID, url string, rt http.RoundT
// TimeToLiveHTTP retrieves lease information of the given lease ID.
func TimeToLiveHTTP(ctx context.Context, id lease.LeaseID, keys bool, url string, rt http.RoundTripper) (*leasepb.LeaseInternalResponse, error) {
// will post lreq protobuf to leader
lreq, err := (&leasepb.LeaseInternalRequest{&pb.LeaseTimeToLiveRequest{ID: int64(id), Keys: keys}}).Marshal()
lreq, err := (&leasepb.LeaseInternalRequest{
LeaseTimeToLiveRequest: &pb.LeaseTimeToLiveRequest{
ID: int64(id),
Keys: keys,
},
}).Marshal()
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 41d37fc

Please sign in to comment.