Created
August 31, 2021 06:11
-
-
Save percybolmer/3f9af204019e852be5332672323d645c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// AddCustomer will add a new customer and return the customerID | |
func (o *OrderService) AddCustomer(name string) (uuid.UUID, error) { | |
c, err := customer.NewCustomer(name) | |
if err != nil { | |
return uuid.Nil, err | |
} | |
// Add to Repo | |
err = o.customers.Add(c) | |
if err != nil { | |
return uuid.Nil, err | |
} | |
return c.GetID(), nil | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment