Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions examples/profilesvc/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ func MakeHTTPHandler(ctx context.Context, s Service, logger log.Logger) http.Han
httptransport.ServerErrorEncoder(encodeError),
}

// POST /profiles adds another profile
// POST /profiles/ adds another profile
// GET /profiles/:id retrieves the given profile by id
// PUT /profiles/:id post updated profile information about the profile
// PATCH /profiles/:id partial updated profile information
// DELETE /profiles/:id remove the given profile
// GET /profiles/:id/addresses retrieve addresses associated with the profile
// GET /profiles/:id/addresses/ retrieve addresses associated with the profile
// GET /profiles/:id/addresses/:addressID retrieve a particular profile address
// POST /profiles/:id/addresses add a new address
// POST /profiles/:id/addresses/ add a new address
// DELETE /profiles/:id/addresses/:addressID remove an address

r.Methods("POST").Path("/profiles/").Handler(httptransport.NewServer(
Expand Down Expand Up @@ -276,7 +276,7 @@ func encodeGetAddressRequest(ctx context.Context, req *http.Request, request int
r := request.(getAddressRequest)
profileID := url.QueryEscape(r.ProfileID)
addressID := url.QueryEscape(r.AddressID)
req.Method, req.URL.Path = "GET", "/profiles/"+profileID+"/addresses/"+ addressID
req.Method, req.URL.Path = "GET", "/profiles/"+profileID+"/addresses/"+addressID
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Huh! gofmt doesn't care either way. Interesting.

return encodeRequest(ctx, req, request)
}

Expand Down