You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: record.go
    path of file: ./repos/minio/internal/s3select/sql
    
    the code of the file until where you have to start completion: // Copyright (c) 2015-2021 MinIO, Inc.
//
// This file is part of MinIO Object Storage stack
//
// This program is free software: you can redistribute it
    
func IterToValue(iter simdjson.Iter) (interface{}, error) {
	switch iter.Type() {
	case simdjson.TypeString:
		v, err := iter.String()
		if err != nil {
			return nil, err
		}
		return v, nil
	case simdjson.TypeFloat:
		v, err := iter.Float()
		if err != nil {
			return nil, err
		}
		return v, nil
	case simdjson.TypeInt:
		v, err := iter.Int()
		if err != nil {
			return nil, err
		}
		return v, nil
	case simdjson.TypeUint:
		v, err := iter.Int()
		if err != nil {
			// Can't fit into int, convert to float.
			v, err := iter.Float()
			return v, err
		}
		return v, nil
	case simdjson.TypeBool:
		v, err := iter.Bool()
		if err != nil {
			return nil, err
		}
		return v, nil
	case simdjson.TypeObject:
		obj, err := iter.Object(nil)
		if err != nil {
			return nil, err
		}
		return *obj, err
	case simdjson.TypeArray:
		arr, err := iter.Array(nil)
		if err != nil {
			return nil, err
		}
		iter := arr.Iter()
		var dst []interface{}
		var next simdjson.Iter
		for {
			typ, err := iter.AdvanceIter(&next)
			if err != nil {
				return nil, err
			}
			if typ == simdjson.TypeNone {
				break
			}
			v, err := IterToValue(next)
			if err != nil {
				return nil, err
			}
			dst = append(dst, v)
		}
		return dst, err
	case simdjson.TypeNull:
		return nil, nil
	}
	return nil, fmt.Errorf("IterToValue: unknown JSON type: %s", iter.Type().String())
}