package eia import ( "context" "fmt" ) func (c *Client) Ping() error { ctx, cncl := context.WithTimeout(c.ctx, c.healthCheckTimeout) defer cncl() resp, err := c.GetV2(ctx) if err != nil { return err } else if resp.StatusCode != 200 { return fmt.Errorf("non-200 response [%s] from eia api", resp.Status) } return nil }