Fix up warnings from `go vet`

Review Request #10026 — Created June 19, 2018 and submitted

Information

rb-gateway
master
19a1329...

Reviewers

go vet ./... reported some warnings, mainly that we were passing API
around by value (and therefore copying a RWLock). We weren't using the
RWLock in any of the functions that accepted API by value, but it is
more correct none-the-less to not copy the data around. We were,
however, passing API by value into a function that modified the token
store, but that is a pointer type so it worked. All methods of API now
take a pointer receiver.

We were also constructing composite literals (i.e., structs) without
naming the fields. We now avoid this everywhere.

  • Ran go fmt ./....
  • Ran go test ./....
  • Ran go vet ./....
david
  1. Ship It!
  2. 
      
brennie
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (87a3840)
Loading...