code: func (c *TelemetryConfig) MergeDefaults(defaults *TelemetryConfig) {
  	if defaults == nil {
  		return
  	}
  	cfgPtrVal := reflect.ValueOf(c)
  	cfgVal := cfgPtrVal.Elem()
  	otherVal := reflect.ValueOf(*defaults)
  	for i := 0; i < cfgVal.NumField(); i++ {
  		f := cfgVal.Field(i)
  		if !f.IsValid() || !f.CanSet() {
  			continue
  		}
  		// See if the current value is a zero-value, if _not_ skip it
  		//
  		// No built in way to check for zero-values for all types so only
  		// implementing this for the types we actually have for now. Test failure
  		// should catch the case where we add new types later.
  		switch f.Kind() {
  		case reflect.Slice:
  			if !f.IsNil() {
  				continue
  			}
  		case reflect.Int, reflect.Int64: // time.Duration == int64
  			if f.Int() != 0 {
  				continue
  			}
  		case reflect.String:
  			if f.String() != "" {
  				continue
  			}
  		case reflect.Bool:
  			if f.Bool() != false {
  				continue
  			}
  		default:
  			// Needs implementing, should be caught by tests.
  			continue
  		}
  
  		// It's zero, copy it from defaults
  		f.Set(otherVal.Field(i))
  	}
  }
docs: // MergeDefaults copies any non-zero field from defaults into the current
  // config.