Skip to content

Commit a5f679c

Browse files
committed
fix linting issues
1 parent 123a068 commit a5f679c

File tree

4 files changed

+43
-24
lines changed

4 files changed

+43
-24
lines changed

plugins/inputs/timex/README.md

Lines changed: 39 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ See the [CONFIGURATION.md][CONFIGURATION.md] for more details.
1717

1818
## Configuration
1919

20-
There are now configuration options for this plugin.
21-
2220
```toml @sample.conf
2321
# Read metrics about temperature
2422
[[inputs.temp]]
@@ -28,23 +26,45 @@ There are now configuration options for this plugin.
2826

2927
- timex
3028
- fields:
31-
- offset_seconds (float) - The offset from local and reference clock.
32-
- frequency_adjustment_ratio (float) - Local clock frequency adjustment ratio.
33-
- maxerror_seconds (float) - The maximum error in seconds.
34-
- estimated_error_seconds (float) - The estimated error in seconds.
35-
- loop_time_constant (float) - Phase-locked loop time constant.
36-
- tick_seconds (float) - Seconds between clock ticks.
37-
- pps_frequency_hertz (float) - Pulse-per-second frequency in hertz.
38-
- pps_jitter_seconds (float) - Pulse-per-second jitter in seconds.
39-
- pps_shift_seconds (float) - Pulse-per-second interval duration in seconds.
40-
- pps_stability_hertz (float) - Pulse-per-second stability, average of relative frequency changes.
41-
- pps_jitter_total (float) - Pulse-per-second per second count of jitter limit exceeded events.
42-
- pps_calibration_total (float) - Pulse-per-second count of calibration intervals.
43-
- pps_error_total (float) - Pulse-per-second count of calibration errors.
44-
- pps_stability_exceeded_total (float) - Pulse-per-second total stability exceeded in seconds.
45-
- tai_offset_seconds (float) - TAI offset in seconds.
46-
- sync_status (int) - Is clock synchronized with a server (1 = yes, 0 = no).
47-
- status (float) - Clock command/status
29+
- offset_seconds (float)
30+
- frequency_adjustment_ratio (float)
31+
- maxerror_seconds (float)
32+
- estimated_error_seconds (float)
33+
- loop_time_constant (float)
34+
- tick_seconds (float)
35+
- pps_frequency_hertz (float)
36+
- pps_jitter_seconds (float)
37+
- pps_shift_seconds (float)
38+
- pps_stability_hertz (float)
39+
- pps_jitter_total (float)
40+
- pps_calibration_total (float)
41+
- pps_error_total (float)
42+
- pps_stability_exceeded_total (float)
43+
- tai_offset_seconds (float)
44+
- sync_status (int)
45+
- status (float)
46+
47+
**Fields**
48+
* offset_seconds - The offset from local and reference clock.
49+
* frequency_adjustment_ratio - Local clock frequency adjustment ratio.
50+
* maxerror_seconds - The maximum error in seconds.
51+
* estimated_error_seconds - The estimated error in seconds.
52+
* loop_time_constant - Phase-locked loop time constant.
53+
* tick_seconds - Seconds between clock ticks.
54+
* pps_frequency_hertz - Pulse-per-second frequency in hertz.
55+
* pps_jitter_seconds - Pulse-per-second jitter in seconds.
56+
* pps_shift_seconds - Pulse-per-second interval duration in seconds.
57+
* pps_stability_hertz - Pulse-per-second stability, average of relative
58+
frequency changes.
59+
* pps_jitter_total - Pulse-per-second per second count of jitter limit
60+
exceeded events.
61+
* pps_calibration_total - Pulse-per-second count of calibration intervals.
62+
* pps_error_total - Pulse-per-second count of calibration errors.
63+
* pps_stability_exceeded_total - Pulse-per-second total stability
64+
exceeded in seconds.
65+
* tai_offset_seconds - TAI offset in seconds.
66+
* sync_status - Is clock synchronized with a server (1 = yes, 0 = no).
67+
* status - Clock command/status
4868

4969
## Example Output
5070

plugins/inputs/timex/timex.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ type Timex struct {
2121
Log telegraf.Logger `toml:"-"`
2222
}
2323

24-
func (tx *Timex) SampleConfig() string {
24+
func (*Timex) SampleConfig() string {
2525
return sampleConfig
2626
}
2727

28-
func (tx *Timex) Init() error {
28+
func (*Timex) Init() error {
2929
return nil
3030
}
3131

32-
func (tx *Timex) Gather(acc telegraf.Accumulator) error {
32+
func (*Timex) Gather(acc telegraf.Accumulator) error {
3333
var timex = new(unix.Timex)
3434

3535
status, err := unix.Adjtimex(timex)

plugins/inputs/timex/timex_notlinux.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ type Timex struct {
1717
Log telegraf.Logger `toml:"-"`
1818
}
1919

20-
2120
func (tx *Timex) SampleConfig() string {
2221
return sampleConfig
2322
}
@@ -34,4 +33,3 @@ func init() {
3433
return &Timex{}
3534
})
3635
}
37-

plugins/inputs/timex/timex_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ func TestDefaultMetricFormat(t *testing.T) {
1111
plugin := &Timex{
1212
Log: &testutil.Logger{},
1313
}
14+
1415
require.NoError(t, plugin.Init())
1516

1617
var acc testutil.Accumulator

0 commit comments

Comments
 (0)