Skip to content
This repository has been archived by the owner on Feb 3, 2024. It is now read-only.

Commit

Permalink
gofmt
Browse files Browse the repository at this point in the history
  • Loading branch information
briandorsey committed Feb 25, 2012
1 parent 6ffae27 commit f7df5f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions memstore/memstore.go
Expand Up @@ -123,14 +123,14 @@ func (s *MemoryStore) Trim(t time.Time) {
delete(s.version, k)
if as, ok := s.app[v.AppId]; ok {
as.HostCount -= 1
s.app[v.AppId] = as
s.app[v.AppId] = as
if as.HostCount < 1 {
delete(s.app, v.AppId)
}
}
if hs, ok := s.host[v.Host]; ok {
hs.AppCount -= 1
s.host[v.Host] = hs
s.host[v.Host] = hs
if hs.AppCount < 1 {
delete(s.host, v.Host)
}
Expand Down
5 changes: 2 additions & 3 deletions memstore/memstore_test.go
Expand Up @@ -33,7 +33,6 @@ func TestAppSummary(t *testing.T) {
t.Error("expected HostCount: 2, actual: ", as.HostCount)
}
}

}

// test Clear() & Update() interactions
Expand Down Expand Up @@ -107,11 +106,11 @@ func TestTrim(t *testing.T) {
t.Error("after all: version count - expected: 0, actual: ", l)
}
if l := len(s.Hosts()); l != 0 {
t.Error(s.Hosts())
t.Error(s.Hosts())
t.Error("after all: host count - expected: 0, actual: ", l)
}
if l := len(s.Apps()); l != 0 {
t.Error(s.Apps())
t.Error(s.Apps())
t.Error("after all: app count - expected: 0, actual: ", l)
}
}

0 comments on commit f7df5f4

Please sign in to comment.