Update to gobook@5e58e0a92b96bee61856a8ce6e75ed849bd504af

This commit is contained in:
Alan Donovan
2015-11-08 17:37:46 -05:00
parent 8eb326f5e8
commit 8908af67d0
7 changed files with 13 additions and 30 deletions
+3 -1
View File
@@ -13,7 +13,9 @@ import (
"net/smtp"
)
func bytesInUse(username string) int64 { return 0 /* ... */ }
var usage = make(map[string]int64)
func bytesInUse(username string) int64 { return usage[username] }
// Email sender configuration.
// NOTE: never put passwords in source code!
+1 -4
View File
@@ -16,10 +16,7 @@ func TestCheckQuotaNotifiesUser(t *testing.T) {
}
const user = "joe@example.org"
// Simulate a 980MB-used condition for this user.
// NOTE: this differs slightly from the printed version.
usage["joe@example.org"] = 980000000
usage[user] = 980000000 // simulate a 980MB-used condition
CheckQuota(user)
if notifiedUser == "" && notifiedMsg == "" {
-2
View File
@@ -4,7 +4,6 @@
// See page 312.
// Package storage is part of a hypothetical cloud storage server.
//!+main
package storage
import (
@@ -13,7 +12,6 @@ import (
"net/smtp"
)
// NOTE: this differs slightly from the printed version.
var usage = make(map[string]int64)
func bytesInUse(username string) int64 { return usage[username] }