Updated tools version to 2.0.0
Also merged lint-style (gofmt) into golangci-lint (enabled gofmt).
Also removed redundant lint-sanity (govet) which is already checked by golangci-lint.
Also made minor code changes to pass new golangci-lint tests.
Also changed lint-mod slightly so it reverts any changes it makes go.mod, go.sum, and vendor/.
VOL-2647
Change-Id: I15557edf0f9225ea1c44e5bab29481d17a82e2b8
diff --git a/db/model/model.go b/db/model/model.go
index 4c944bf..f80f957 100644
--- a/db/model/model.go
+++ b/db/model/model.go
@@ -26,13 +26,15 @@
}
}
+type contextKey string
+
const (
// DataRefreshPeriod is period to determine when data requires a refresh (in milliseconds)
// TODO: make this configurable?
DataRefreshPeriod int64 = 5000
// RequestTimestamp attribute used to store a timestamp in the context object
- RequestTimestamp = "request-timestamp"
+ RequestTimestamp contextKey = "request-timestamp"
// ReservationTTL is time limit for a KV path reservation (in seconds)
ReservationTTL int64 = 180