Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use named field names in composite literals
As #35 was coming in, I noticed that as of Go 1.10, `go vet` complains about the use of unkeyed fields in composite literals: ``` go vet ./... ./example_test.go:26: github.com/throttled/throttled.RateQuota composite literal uses unkeyed fields ./example_test.go:51: github.com/throttled/throttled.RateQuota composite literal uses unkeyed fields ./http_test.go:19: github.com/throttled/throttled.RateLimitResult composite literal uses unkeyed fields ./http_test.go:23: github.com/throttled/throttled.RateLimitResult composite literal uses unkeyed fields ./rate_test.go:41: github.com/throttled/throttled.RateQuota composite literal uses unkeyed fields ./rate_test.go:114: github.com/throttled/throttled.RateQuota composite literal uses unkeyed fields ``` Which is unfortunately failing the build for the `1.x` version. This patch names fields wherever we were using the unkeyed kind.
- Loading branch information
Showing
3 changed files
with
20 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters