Skip to content

Commit 51eaffe

Browse files
committed
chore: fix a large number of spelling issues
Signed-off-by: sunnyraindy <sunnyraindy@outlook.com>
1 parent 3265c1a commit 51eaffe

File tree

9 files changed

+18
-18
lines changed

9 files changed

+18
-18
lines changed

libs/closers/log.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
loggingutils "github.com/brave-intl/bat-go/libs/logging"
88
)
99

10-
// Log calls Close on the specified closer, panicing on error
10+
// Log calls Close on the specified closer, panicking on error
1111
func Log(ctx context.Context, c io.Closer) {
1212
// get the logger from the context
1313
logger := loggingutils.Logger(ctx, "closer.Log")

libs/closers/panic.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"github.com/brave-intl/bat-go/libs/logging"
99
)
1010

11-
// Panic calls Close on the specified closer, panicing on error
11+
// Panic calls Close on the specified closer, panicking on error
1212
func Panic(ctx context.Context, c io.Closer) {
1313
logger := logging.Logger(ctx, "closers.Panic")
1414
if c == nil {

libs/kv/kv_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func TestMapKv(t *testing.T) {
2727
}
2828

2929
if _, err := store.Get("DEAD"); err == nil {
30-
t.Error("Get should return an error on nonexistant key")
30+
t.Error("Get should return an error on nonexistent key")
3131
}
3232

3333
if r, err := store.Delete("FOO"); !r || err != nil {

services/ratios/cmd/rest_run.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func RestRun(command *cobra.Command, args []string) {
4949
// setup the service now
5050
ctx, s, err := ratios.InitService(ctx)
5151
if err != nil {
52-
logger.Fatal().Err(err).Msg("failed to initalize ratios service")
52+
logger.Fatal().Err(err).Msg("failed to initialize ratios service")
5353
}
5454

5555
// do rest endpoints

services/ratios/inputs.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ type CoingeckoCoin struct {
1818
coin string
1919
}
2020

21-
// String - stringer implmentation
21+
// String - stringer implementation
2222
func (cc *CoingeckoCoin) String() string {
2323
return string(cc.coin)
2424
}
@@ -79,7 +79,7 @@ var (
7979
// CoingeckoCoinList - type for coingecko coin list input
8080
type CoingeckoCoinList []CoingeckoCoin
8181

82-
// String - stringer implmentation
82+
// String - stringer implementation
8383
func (ccl *CoingeckoCoinList) String() string {
8484
var s []string
8585
for _, coin := range *ccl {
@@ -127,7 +127,7 @@ func (ccl *CoingeckoCoinList) Validate(ctx context.Context) error {
127127
// CoingeckoVsCurrency - type for coingecko vs currency input
128128
type CoingeckoVsCurrency string
129129

130-
// String - stringer implmentation
130+
// String - stringer implementation
131131
func (cvc *CoingeckoVsCurrency) String() string {
132132
return string(*cvc)
133133
}
@@ -168,7 +168,7 @@ var (
168168
// CoingeckoVsCurrencyList - type for coingecko vs currency list input
169169
type CoingeckoVsCurrencyList []CoingeckoVsCurrency
170170

171-
// String - stringer implmentation
171+
// String - stringer implementation
172172
func (cvcl *CoingeckoVsCurrencyList) String() string {
173173
var s []string
174174
for _, vc := range *cvcl {
@@ -211,7 +211,7 @@ func (cvcl *CoingeckoVsCurrencyList) Validate(ctx context.Context) error {
211211
// CoingeckoDuration - type for coingecko duration input
212212
type CoingeckoDuration string
213213

214-
// String - stringer implmentation
214+
// String - stringer implementation
215215
func (cd *CoingeckoDuration) String() string {
216216
return string(*cd)
217217
}
@@ -289,12 +289,12 @@ func (cd *CoingeckoDuration) Validate(ctx context.Context) error {
289289
// Note: we only will request the first page
290290
type CoingeckoLimit int
291291

292-
// String - stringer implmentation
292+
// String - stringer implementation
293293
func (cl *CoingeckoLimit) String() string {
294294
return strconv.Itoa(int(*cl))
295295
}
296296

297-
// Int - int conversion implmentation
297+
// Int - int conversion implementation
298298
func (cl *CoingeckoLimit) Int() int {
299299
return int(*cl)
300300
}

services/rewards/inputs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
// BaseCurrency - type for base currency input
1111
type BaseCurrency string
1212

13-
// String - stringer implmentation
13+
// String - stringer implementation
1414
func (rbc *BaseCurrency) String() string {
1515
return string(*rbc)
1616
}

services/skus/service.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,7 +1080,7 @@ func (s *Service) CreateTransactionFromRequest(ctx context.Context, req CreateTr
10801080
return nil, errorutils.Wrap(err, "error validating order is paid")
10811081
}
10821082

1083-
// If the transaction that was satisifies the order then let's update the status
1083+
// If the transaction that was satisfies the order then let's update the status
10841084
if isPaid {
10851085
err = s.Datastore.UpdateOrder(transaction.OrderID, "paid")
10861086
if err != nil {
@@ -1092,7 +1092,7 @@ func (s *Service) CreateTransactionFromRequest(ctx context.Context, req CreateTr
10921092
return transaction, err
10931093
}
10941094

1095-
// UpdateTransactionFromRequest queries the endpoints and creates a transaciton
1095+
// UpdateTransactionFromRequest queries the endpoints and creates a transaction
10961096
func (s *Service) UpdateTransactionFromRequest(ctx context.Context, req CreateTransactionRequest, orderID uuid.UUID, getCustodialTx getCustodialTxFn) (*Transaction, error) {
10971097

10981098
sublogger := logging.Logger(ctx, "payments").With().
@@ -1118,7 +1118,7 @@ func (s *Service) UpdateTransactionFromRequest(ctx context.Context, req CreateTr
11181118
return nil, errorutils.Wrap(err, "error validating order is paid")
11191119
}
11201120

1121-
// If the transaction that was satisifies the order then let's update the status
1121+
// If the transaction that was satisfies the order then let's update the status
11221122
if isPaid {
11231123
err = s.Datastore.UpdateOrder(transaction.OrderID, "paid")
11241124
if err != nil {
@@ -2245,7 +2245,7 @@ func (s *Service) redeemBlindedCred(ctx context.Context, w http.ResponseWriter,
22452245
case timeLimitedV2:
22462246
redeemFn = s.cbClient.RedeemCredentialV3
22472247
default:
2248-
return handlers.WrapError(fmt.Errorf("credential type %s not suppoted", kind), "unknown credential type %s", http.StatusBadRequest)
2248+
return handlers.WrapError(fmt.Errorf("credential type %s not supported", kind), "unknown credential type %s", http.StatusBadRequest)
22492249
}
22502250

22512251
// FIXME: we shouldn't be using the issuer as the payload, it ideally would be a unique request identifier

services/skus/storage/repository/repository.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ func (r *Order) GetTimeBounds(ctx context.Context, dbi sqlx.QueryerContext, id u
143143
// GetExpiresAtAfterISOPeriod returns a new value for expires_at that is last_paid_at plus ISO period.
144144
//
145145
// It falls back to now() when last_paid_at is NULL.
146-
// It uses the maximum of the order items' valid_for_iso as inverval, and falls back to 1 month.
146+
// It uses the maximum of the order items' valid_for_iso as interval, and falls back to 1 month.
147147
func (r *Order) GetExpiresAtAfterISOPeriod(ctx context.Context, dbi sqlx.QueryerContext, id uuid.UUID) (time.Time, error) {
148148
const q = `SELECT COALESCE(last_paid_at, now()) +
149149
(SELECT COALESCE(MAX(valid_for_iso::interval), interval '1 month') FROM order_items WHERE order_id = $2)

services/wallet/datastore.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,7 @@ func (pg *Postgres) ConnectCustodialWallet(ctx context.Context, cl *CustodianLin
974974
); err != nil {
975975
sublogger.Error().Err(err).
976976
Msg("failed to update wallets with new deposit destination")
977-
return fmt.Errorf("error updating wallets with new deposit desintation: %w", err)
977+
return fmt.Errorf("error updating wallets with new deposit destination: %w", err)
978978
} else if r != nil {
979979
count, _ := r.RowsAffected()
980980
if count < 1 {

0 commit comments

Comments
 (0)