mirror of
https://github.com/teivah/100-go-mistakes.git
synced 2026-06-20 16:45:56 +08:00
20 lines
325 B
Go
20 lines
325 B
Go
package main
|
|
|
|
type CustomerService struct {
|
|
store Store
|
|
}
|
|
|
|
func (cs CustomerService) CreateNewCustomer(id string) error {
|
|
customer := Customer{id: id}
|
|
return cs.store.StoreCustomer(customer)
|
|
}
|
|
|
|
type Customer struct {
|
|
id string
|
|
}
|
|
|
|
type Store struct{}
|
|
|
|
func (s Store) StoreCustomer(customer Customer) error {
|
|
return nil
|
|
}
|