mirror of
https://github.com/wahyd4/cash-code-test.git
synced 2026-08-18 01:36:08 +10:00
17 lines
326 B
Go
17 lines
326 B
Go
package commands
|
|
|
|
import (
|
|
"github.com/wahyd4/cash/domains"
|
|
)
|
|
|
|
// OpenAccountCommand the command for creating a bank account
|
|
type OpenAccountCommand struct {
|
|
Username string
|
|
}
|
|
|
|
// Run creates a bank account
|
|
func (command *OpenAccountCommand) Run(bank *domains.Bank) error {
|
|
bank.OpenAccount(command.Username)
|
|
return nil
|
|
}
|