Skip to content

Commit f5f308f

Browse files
committed
[messages] add simNumber flag alias
1 parent 845addf commit f5f308f

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ smsgate send [options] 'Message content'
106106
| Option | Description | Default value | Example |
107107
| --------------------------- | ------------------------------------------------------------------------------------------ | ------------- | ----------------------- |
108108
| `--id` | Message ID, will be generated if not provided | empty | `zXDYfTmTVf3iMd16zzdBj` |
109-
| `--phone`, `--phones`, `-p` | Phone number, can be used multiple times or with comma-separated values | **required** | `+19162255887` |
110-
| `--sim` | SIM card slot number, if empty, the default SIM card will be used | empty | `2` |
109+
| `--phone`, `--phones`, `-p` | Phone number, can be used multiple times or with comma-separated values, E.164 format | **required** | `+19162255887` |
110+
| `--sim`, `--simNumber` | One-based SIM card slot number, if empty, the default SIM card will be used | empty | `2` |
111111
| `--ttl` | Time-to-live (TTL), if empty, the message will not expire<br>Conflicts with `--validUntil` | empty | `1h30m` |
112112
| `--validUntil` | Valid until, if empty, the message will not expire<br>Conflicts with `--ttl` | empty | `2024-12-31T23:59:59Z` |
113113

internal/commands/messages/send.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,22 @@ var send = &cli.Command{
2525
&cli.StringSliceFlag{
2626
Name: "phones",
2727
Aliases: []string{"p", "phone"},
28-
Usage: "Phone numbers",
28+
Usage: "Phone numbers (E.164 format, e.g. +19162255887)",
2929
Required: true,
3030
},
3131
&cli.IntFlag{
32-
Name: "sim",
33-
Usage: "SIM card index (1-3)",
32+
Name: "sim",
33+
Aliases: []string{"simNumber"},
34+
Usage: "SIM card index (one-based index, e.g. 1)",
3435
},
3536
&cli.DurationFlag{
3637
Name: "ttl",
37-
Usage: "Time to live",
38+
Usage: "Time to live (duration, e.g. 1h30m)",
3839
DefaultText: "unlimited",
3940
},
4041
&cli.TimestampFlag{
4142
Name: "validUntil",
42-
Usage: "Valid until",
43+
Usage: "Valid until (RFC3339 format, e.g. 2006-01-02T15:04:05Z07:00)",
4344
Layout: time.RFC3339,
4445
Timezone: time.Local,
4546
},

0 commit comments

Comments
 (0)