Skip to content

Commit 95d99c8

Browse files
authored
translate comments in lines 78-114
1 parent 9bc7c2f commit 95d99c8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

challenge-7/submissions/kiramux/solution-template.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ func (e *ExceedsLimitError) Error() string {
7575
func NewBankAccount(id, owner string, initialBalance, minBalance float64) (*BankAccount, error) {
7676
// Determine the validity of the parameters.
7777

78-
// 验证 accountID
78+
// Validate accountID
7979
if id == "" {
8080
return nil, &AccountError{
8181
Code: "INVALID_ACCOUNT_ID",
@@ -84,7 +84,7 @@ func NewBankAccount(id, owner string, initialBalance, minBalance float64) (*Bank
8484
}
8585
}
8686

87-
// 验证 owner
87+
// Validate owner
8888
if owner == "" {
8989
return nil, &AccountError{
9090
Code: "INVALID_OWNER",
@@ -93,7 +93,7 @@ func NewBankAccount(id, owner string, initialBalance, minBalance float64) (*Bank
9393
}
9494
}
9595

96-
// 验证 initialBalance
96+
// Validate initial balance
9797
if initialBalance < 0 {
9898
return nil, &NegativeAmountError{
9999
Code: "INVALID_INITIAL_BALANCE",
@@ -102,7 +102,7 @@ func NewBankAccount(id, owner string, initialBalance, minBalance float64) (*Bank
102102
}
103103
}
104104

105-
// 验证 minBalance
105+
// Validate minimum balance
106106
if minBalance < 0 {
107107
return nil, &NegativeAmountError{
108108
Code: "INVALID_MIN_BALANCE",
@@ -111,7 +111,7 @@ func NewBankAccount(id, owner string, initialBalance, minBalance float64) (*Bank
111111
}
112112
}
113113

114-
// 比较 initialBalance 和 minBalance
114+
// Compare initial balance and minimum balance
115115
if initialBalance < minBalance {
116116
return nil, &InsufficientFundsError{
117117
Code: "INSUFFICIENT_FUND",

0 commit comments

Comments
 (0)