code: func ToMap(kvs []interface{}) map[string]interface{} {
  	m := map[string]interface{}{}
  
  	if len(kvs) == 0 {
  		return m
  	}
  
  	if len(kvs)%2 == 1 {
  		kvs = append(kvs, nil)
  	}
  
  	for i := 0; i < len(kvs); i += 2 {
  		merge(m, kvs[i], kvs[i+1])
  	}
  
  	return m
  }
docs: // ToMap creates a map of key-value pairs from a variadic key-value pair slice.
  //
  // The implementation bellow is from go-kit's JSON logger.