Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
benjefferies committed Dec 24, 2018
1 parent 9b917e5 commit 5da488f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion garage_door_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func (this GarageDoorResource) useOneTimePin(request *restful.Request, response
log.Infof("Pin has already been used")
response.WriteHeaderAndEntity(401, "Pin has already been used")
} else if err != nil {
log.WithError(err).Error("Could not get pin used date for [%s]", oneTimePin)
log.WithError(err).Errorf("Could not get pin used date for [%s]", oneTimePin)
response.WriteHeaderAndEntity(500, "Failed to open garage")
} else {
err = this.pinDao.use(oneTimePin)
Expand Down
2 changes: 1 addition & 1 deletion pin_dao.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (this PinDao) getPinUsedDate(pin string) (int64, error) {
var usedDate int64
row.Scan(&usedDate)
if err != nil {
log.WithError(err).Error("Could not get pin used date for [%s]", pin)
log.WithError(err).Errorf("Could not get pin used date for [%s]", pin)
tx.Rollback()
} else {
tx.Commit()
Expand Down
2 changes: 1 addition & 1 deletion server.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func createUser(userDao UserDao) bool {
if (*email != "" && password != nil) && (email != nil && *password != "") {
user, err := User{Email: *email, Password: *password}.hashPassword()
if err != nil {
log.Fatalf("Failed to create user: %s" , email)
log.WithError(err).Fatalf("Failed to create user: %s" , *email)
}
userDao.createUser(user)
log.Infof("Created account email:%s. Exiting...", *email)
Expand Down

0 comments on commit 5da488f

Please sign in to comment.