MCPcopy
hub / github.com/elastic/go-elasticsearch / validateConfig

Function validateConfig

_benchmarks/benchmarks/runner/runner.go:396–426  ·  view source on GitHub ↗
(cfg Config)

Source from the content-addressed store, hash-verified

394}
395
396func validateConfig(cfg Config) error {
397 if cfg.BuildID == "" {
398 return fmt.Errorf("missing cfg.BuildID")
399 }
400
401 if cfg.Action == "" {
402 return fmt.Errorf("missing cfg.Action")
403 }
404
405 if cfg.Category == "" {
406 return fmt.Errorf("missing cfg.Category")
407 }
408
409 if cfg.Environment == "" {
410 return fmt.Errorf("missing cfg.Environment")
411 }
412
413 if cfg.RunnerClient == nil {
414 return fmt.Errorf("missing cfg.RunnerClient")
415 }
416
417 if cfg.ReportClient == nil {
418 return fmt.Errorf("missing cfg.ReportClient")
419 }
420
421 if cfg.RunnerFunc == nil {
422 return fmt.Errorf("missing cfg.RunnerFunc")
423 }
424
425 return nil
426}

Callers 2

NewRunnerFunction · 0.85
RunMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected