Skip to content

Commit

Permalink
doc: add comments about the used struct
Browse files Browse the repository at this point in the history
  • Loading branch information
graugans committed Apr 13, 2024
1 parent 9ae4652 commit 6769c11
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/ovp8xx/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,17 @@ func (device *Client) GetDiagnosticClient() *DiagnosisClient {
func (d *Client) IsAvailable(timeout time.Duration) (bool, error) {
var err error
proc := make(chan struct{}, 1)

conf := *NewConfig()
// result is a struct that represents the response from the OVP8xx device.
// It contains information about the device's diagnostic data, such as the configuration initialization stages.
result := struct {
Device struct {
Diagnostic struct {
ConfInitStages []string `json:"confInitStages"`
} `json:"diagnostic"`
} `json:"device"`
}{}
conf := *NewConfig()

go func() {
for {
if conf, err = d.Get([]string{"/device/diagnostic/confInitStages"}); err != nil {
Expand Down

0 comments on commit 6769c11

Please sign in to comment.