Skip to content

Commit

Permalink
Ameliorate this comment to include note about RPC paths
Browse files Browse the repository at this point in the history
  • Loading branch information
brandur committed Mar 22, 2019
1 parent 88ae119 commit d9367f9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,12 @@ func (s *StubServer) initializeRouter() error {

// We use whether the route ends with a parameter as a heuristic as
// to whether we should expect an object's primary ID in the URL.
//
// The most common suffix in hasPrimaryIDSuffixes is just `}` which
// represents the end of a parameter.
//
// It also has a lot of other special cases for RPC-style actions
// like `/approve`.
var hasPrimaryID bool
for _, suffix := range hasPrimaryIDSuffixes {
if strings.HasSuffix(string(path), suffix) {
Expand Down

0 comments on commit d9367f9

Please sign in to comment.