Rename TimeSyncStatus() to TimeSynced() for API clarity
This commit is contained in:
parent
6534c51fe4
commit
13267b2d5a
|
@ -113,7 +113,7 @@ func updateThenReboot() {
|
|||
defer updater.Close()
|
||||
|
||||
log.Println("checking time sync")
|
||||
synced, err := updater.TimeSyncStatus()
|
||||
synced, err := updater.TimeSynced()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
|
|
@ -16,8 +16,9 @@ type timeSyncStatus struct {
|
|||
Status bool `json:"status"`
|
||||
}
|
||||
|
||||
// TimeSyncStatus returns the ReachRS module time sync status
|
||||
func (u *Updater) TimeSyncStatus() (bool, error) {
|
||||
// TimeSynced returns the ReachRS module time synchronization status.
|
||||
// A true response means that the module has synchronized its clock.
|
||||
func (u *Updater) TimeSynced() (bool, error) {
|
||||
|
||||
var err error
|
||||
var synced bool
|
||||
|
|
|
@ -18,7 +18,7 @@ func TestClientTimeSync(t *testing.T) {
|
|||
t.Fatal(err)
|
||||
}
|
||||
|
||||
_, err := client.TimeSyncStatus()
|
||||
_, err := client.TimeSynced()
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
|
|
Reference in New Issue