package
0.0.0-20230417073922-be6d0a693c4f
Repository: https://github.com/huavanthong/design-patterns.git
Documentation: pkg.go.dev

# Functions

NewBankAccountController creates a new BankAccountController with the specified BankAccount.

# Structs

BankAccount represents a bank account with a balance.
BankAccountCommand is a class responsible for writing data to the BankAccount.
BankAccountController is a class responsible for handling user input and coordinating between the view, query, and command objects.
BankAccountQuery is a class responsible for reading data from the BankAccount.
BankAccountView is a class responsible for displaying the BankAccount balance to the user.

# Interfaces

Experience 2: Chúng ta có thể không cần define interface cho BankAccount struct bởi vì mục đích interface lúc này là giúp ta có thể dễ quản lý và sử dụng ở các package khác.