Skip to content

Commit edde80c

Browse files
committed
fix(ifdata): Fix flag descriptions
1 parent 9ff86ec commit edde80c

File tree

2 files changed

+26
-26
lines changed

2 files changed

+26
-26
lines changed

cmd/ifdata/formatter.go

+14-14
Original file line numberDiff line numberDiff line change
@@ -60,18 +60,18 @@ func (f formatter) description() string {
6060
return `Prints "yes" or "no" if the interface exists or not`
6161
case fmtAddress:
6262
return "Prints the IP address of the interface"
63-
case fmtNetmask:
64-
return "Prints the netmask of the interface"
6563
case fmtNetworkAddress:
6664
return "Prints the network address of the interface"
65+
case fmtNetmask:
66+
return "Prints the netmask of the interface"
6767
case fmtBroadcastAddress:
6868
return "Prints the broadcast address of the interface"
6969
case fmtMTU:
7070
return "Prints the MTU of the interface"
7171
case fmtFlags:
72-
return "Prints the hardware address of the interface. Exit with a failure exit code if there is not hardware address for the given network interface"
73-
case fmtHardwareAddress:
7472
return "Prints the flags of the interface"
73+
case fmtHardwareAddress:
74+
return "Prints the hardware address of the interface. Exit with a failure exit code if there is not hardware address for the given network interface"
7575
case fmtInputStatistics:
7676
return "Prints all input statistics of the interface"
7777
case fmtInputPackets:
@@ -88,25 +88,25 @@ func (f formatter) description() string {
8888
return "Prints the number of compressed input packets"
8989
case fmtInputMulticast:
9090
return "Prints the number of input multicast packets"
91-
case fmtInputBytesSecond:
92-
return "Prints all output statistics of the interface"
9391
case fmtOutputStatistics:
94-
return "Prints the number of output packets"
92+
return "Prints all output statistics of the interface"
9593
case fmtOutputPackets:
96-
return "Prints the number of output bytes"
94+
return "Prints the number of output packets"
9795
case fmtOutputBytes:
98-
return "Prints the number of output errors"
96+
return "Prints the number of output bytes"
9997
case fmtOutputErrors:
100-
return "Prints the number of dropped output packets"
98+
return "Prints the number of output errors"
10199
case fmtOutputDropped:
102-
return "Prints the number of output fifo overruns"
100+
return "Prints the number of dropped output packets"
103101
case fmtOutputFIFO:
104-
return "Prints the number of output collisions"
102+
return "Prints the number of output fifo overruns"
105103
case fmtOutputCollisions:
106-
return "Prints the number of output carrier losses"
104+
return "Prints the number of output collisions"
107105
case fmtOutputCarrierLosses:
108-
return "Prints the number of output multicast packets"
106+
return "Prints the number of output carrier losses"
109107
case fmtOutputMulticast:
108+
return "Prints the number of output multicast packets"
109+
case fmtInputBytesSecond:
110110
return "Prints the number of bytes of incoming traffic measured in one second"
111111
case fmtOutputBytesSecond:
112112
return "Prints the number of bytes of outgoing traffic measured in one second"

docs/ifdata.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ ifdata [flags] interface
1818
-pn Prints the netmask of the interface
1919
-pb Prints the broadcast address of the interface
2020
-pm Prints the MTU of the interface
21-
-pf Prints the hardware address of the interface. Exit with a failure exit code if there is not hardware address for the given network interface
22-
-ph Prints the flags of the interface
21+
-pf Prints the flags of the interface
22+
-ph Prints the hardware address of the interface. Exit with a failure exit code if there is not hardware address for the given network interface
2323
-si Prints all input statistics of the interface
2424
-sip Prints the number of input packets
2525
-sib Prints the number of input bytes
@@ -28,16 +28,16 @@ ifdata [flags] interface
2828
-sif Prints the number of input fifo overruns
2929
-sic Prints the number of compressed input packets
3030
-sim Prints the number of input multicast packets
31-
-so Prints the number of output packets
32-
-sop Prints the number of output bytes
33-
-sob Prints the number of output errors
34-
-soe Prints the number of dropped output packets
35-
-sod Prints the number of output fifo overruns
36-
-sof Prints the number of output collisions
37-
-sox Prints the number of output carrier losses
38-
-soc Prints the number of output multicast packets
39-
-som Prints the number of bytes of incoming traffic measured in one second
40-
-bips Prints all output statistics of the interface
31+
-so Prints all output statistics of the interface
32+
-sop Prints the number of output packets
33+
-sob Prints the number of output bytes
34+
-soe Prints the number of output errors
35+
-sod Prints the number of dropped output packets
36+
-sof Prints the number of output fifo overruns
37+
-sox Prints the number of output collisions
38+
-soc Prints the number of output carrier losses
39+
-som Prints the number of output multicast packets
40+
-bips Prints the number of bytes of incoming traffic measured in one second
4141
-bops Prints the number of bytes of outgoing traffic measured in one second
4242
-v version for ifdata
4343
```

0 commit comments

Comments
 (0)