MCPcopy Create free account
hub / github.com/derekbanas/Go-Tutorial / TestIsEmail

Function TestIsEmail

app2/testemail_test.go:7–22  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

5)
6
7func TestIsEmail(t *testing.T) {
8 _, err := IsEmail("hello")
9 if err == nil {
10 t.Error("hello is not an email")
11 }
12
13 _, err = IsEmail("derek@aol.com")
14 if err != nil {
15 t.Error("derek@aol.com is an email")
16 }
17
18 _, err = IsEmail("derek@aol")
19 if err != nil {
20 t.Error("derek@aol is not email")
21 }
22}

Callers

nothing calls this directly

Calls 1

IsEmailFunction · 0.85

Tested by

no test coverage detected