Fixes for gofmt -s

This commit is contained in:
Derek Collison
2016-07-11 12:16:21 -07:00
parent d31d9f41c7
commit ab11e04bf9
2 changed files with 4 additions and 4 deletions

View File

@@ -906,7 +906,7 @@ func (c *client) processMsg(msg []byte) {
if len(c.perms.pcache) > maxPermCacheSize {
// Prune the permissions cache. Keeps us from unbounded growth.
r := 0
for subject, _ := range c.perms.pcache {
for subject := range c.perms.pcache {
delete(c.cache.results, subject)
r++
if r > pruneSize {
@@ -950,7 +950,7 @@ func (c *client) processMsg(msg []byte) {
if len(c.cache.results) > maxResultCacheSize {
// Prune the results cache. Keeps us from unbounded growth.
r := 0
for subject, _ := range c.cache.results {
for subject := range c.cache.results {
delete(c.cache.results, subject)
r++
if r > pruneSize {

View File

@@ -188,7 +188,7 @@ func (s *Sublist) addToCache(subject string, sub *subscription) {
// removeFromCache will remove the sub from any active cache entries.
// Assumes write lock is held.
func (s *Sublist) removeFromCache(subject string, sub *subscription) {
for k, _ := range s.cache {
for k := range s.cache {
if !matchLiteral(k, subject) {
continue
}
@@ -231,7 +231,7 @@ func (s *Sublist) Match(subject string) *SublistResult {
s.cache[subject] = result
// Bound the number of entries to sublistMaxCache
if len(s.cache) > slCacheMax {
for k, _ := range s.cache {
for k := range s.cache {
delete(s.cache, k)
break
}