Skip to content

Commit

Permalink
Expanded email regex and repinned devops-resources to working version
Browse files Browse the repository at this point in the history
  • Loading branch information
cfculler committed Dec 8, 2023
1 parent 9ea5f29 commit 6f3f346
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/ch7/devops-api/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.19

require (
github.com/gin-gonic/gin v1.8.1
github.com/liatrio/devops-bootcamp/examples/ch7/devops-resources v0.0.0-20221129190731-63b117bcfecd
github.com/liatrio/devops-bootcamp/examples/ch7/devops-resources v0.0.0-20230921193819-569bb9d9dbdd
)

require (
Expand Down
4 changes: 2 additions & 2 deletions examples/ch7/devops-api/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w=
github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY=
github.com/liatrio/devops-bootcamp/examples/ch7/devops-resources v0.0.0-20221129190731-63b117bcfecd h1:qrYCoa6c0YfJI2bXBgqstKhIBIe+5Mm3AMolgiYttOU=
github.com/liatrio/devops-bootcamp/examples/ch7/devops-resources v0.0.0-20221129190731-63b117bcfecd/go.mod h1:Wy8YNDvnY+iVDU2soHwZQFTv0NQ1sBoJQVTe44z4wF0=
github.com/liatrio/devops-bootcamp/examples/ch7/devops-resources v0.0.0-20230921193819-569bb9d9dbdd h1:eiG3C02qmeb9b59I0ZRKItggRZ8Yy1YkIHVnY6+A+hA=
github.com/liatrio/devops-bootcamp/examples/ch7/devops-resources v0.0.0-20230921193819-569bb9d9dbdd/go.mod h1:4/jOK0F/KUFEvemqN4XCD4aVXhAMEZ+VDXR1mPB9CFk=
github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=
Expand Down
4 changes: 2 additions & 2 deletions examples/ch7/devops-api/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"regexp"

"github.com/gin-gonic/gin"
"github.com/liatrio/devops-bootcamp/examples/ch7/devops-resources"
devops_resource "github.com/liatrio/devops-bootcamp/examples/ch7/devops-resources"
)

// Global maps to access our resources by id key
Expand All @@ -16,7 +16,7 @@ var operations = make([]*devops_resource.Ops, 0)
var developer_operations = make([]*devops_resource.DevOps, 0)

func verifyEmail(email string) bool {
result, _ := regexp.MatchString("^([a-zA-Z]|[0-9])+@[a-z]+\\.[a-z]+(\\.[a-z]+)*$", email)
result, _ := regexp.MatchString("^[\\w._%+\\-\\/\\]+@[\\w.\\-]+\\.[a-z]{2,4}$", email)
return result
}

Expand Down

0 comments on commit 6f3f346

Please sign in to comment.