Commit f29021c9 authored by Sybren A. Stüvel's avatar Sybren A. Stüvel

Added some comment to MergeStructs

parent 79e2cac1
......@@ -28,6 +28,8 @@ import (
// MergeStructs merges an array of structs into a single struct.
// The 'responses' argument has to be an array of type X.
// The 'mergedResp' has to be a pointer to an instance of type X.
func MergeStructs(responses interface{}, mergedResp interface{}) {
arrayType := reflect.TypeOf(responses)
if arrayType.Kind() != reflect.Slice && arrayType.Kind() != reflect.Array {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment