Skip to content

Commit feee539

Browse files
committed
refactor: empty string check
1 parent f1085d5 commit feee539

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

api/pkg/requests/message_bulk_send_request.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func (input *MessageBulkSend) Sanitize() MessageBulkSend {
2929
}
3030
input.To = to
3131
input.From = input.sanitizeAddress(input.From)
32-
if len(strings.TrimSpace(string(input.SIM))) == 0 {
32+
if strings.TrimSpace(string(input.SIM)) == "" {
3333
input.SIM = entities.SIM_DEFAULT
3434
}
3535
return *input

api/pkg/requests/message_receive_request.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ type MessageReceive struct {
2727
func (input *MessageReceive) Sanitize() MessageReceive {
2828
input.To = input.sanitizeAddress(input.To)
2929
input.From = input.sanitizeAddress(input.From)
30-
if len(strings.TrimSpace(string(input.SIM))) == 0 {
30+
if strings.TrimSpace(string(input.SIM)) == "" {
3131
input.SIM = entities.SIM_DEFAULT
3232
}
3333
return *input

api/pkg/requests/message_send_request.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ type MessageSend struct {
2525
func (input *MessageSend) Sanitize() MessageSend {
2626
input.To = input.sanitizeAddress(input.To)
2727
input.From = input.sanitizeAddress(input.From)
28-
if len(strings.TrimSpace(string(input.SIM))) == 0 {
28+
if strings.TrimSpace(string(input.SIM)) == "" {
2929
input.SIM = entities.SIM_DEFAULT
3030
}
3131
return *input

0 commit comments

Comments
 (0)