(ctx context.Context, clientId string, usageTelemetry bool)
| 299 | } |
| 300 | |
| 301 | func SendDiagnosticPing(ctx context.Context, clientId string, usageTelemetry bool) error { |
| 302 | endpoint := GetPingEndpoint() |
| 303 | if endpoint == "" { |
| 304 | return nil |
| 305 | } |
| 306 | localDate := time.Now().Format("2006-01-02") |
| 307 | input := PingInputType{ |
| 308 | ClientId: clientId, |
| 309 | Arch: wavebase.ClientArch(), |
| 310 | Version: "v" + wavebase.WaveVersion, |
| 311 | LocalDate: localDate, |
| 312 | UsageTelemetry: usageTelemetry, |
| 313 | } |
| 314 | req, err := makePingPostReq(ctx, PingUrl, input) |
| 315 | if err != nil { |
| 316 | return err |
| 317 | } |
| 318 | _, err = doRequest(req, nil, false) |
| 319 | if err != nil { |
| 320 | return err |
| 321 | } |
| 322 | return nil |
| 323 | } |
no test coverage detected