flake8
passed.
JSHint
passed.
Review Request #10026 — Created June 19, 2018 and submitted
go vet ./...
reported some warnings, mainly that we were passing API
around by value (and therefore copying aRWLock
). We weren't using the
RWLock in any of the functions that acceptedAPI
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 ofAPI
now
take a pointer receiver.We were also constructing composite literals (i.e., structs) without
naming the fields. We now avoid this everywhere.
go fmt ./...
.go test ./...
.go vet ./...
.