This commit is contained in:
Fedor Korotkiy 2020-03-19 16:28:29 +03:00
parent 20483034d0
commit 2d46cb0487
3 changed files with 12 additions and 1 deletions

View file

@ -10,7 +10,7 @@ import (
func main() { func main() {
handler := func(w http.ResponseWriter, r *http.Request) { handler := func(w http.ResponseWriter, r *http.Request) {
io.WriteString(w, "<html><body>Hello World!</body></html>") _, _ = io.WriteString(w, "<html><body>Hello World!</body></html>")
} }
req := httptest.NewRequest("GET", "http://example.com/foo", nil) req := httptest.NewRequest("GET", "http://example.com/foo", nil)

View file

@ -1,9 +1,18 @@
package mocks
import ( import (
"fmt" "fmt"
"log" "log"
"net/smtp" "net/smtp"
) )
var sender, password, hostname string
var template = "%d. %d%% of your quota"
func bytesInUse(username string) int {
return 10000000000
}
var notifyUser = doNotifyUser var notifyUser = doNotifyUser
func doNotifyUser(username, msg string) { func doNotifyUser(username, msg string) {

View file

@ -1,3 +1,5 @@
package mocks
import ( import (
"strings" "strings"
"testing" "testing"