如何在Golang中使用Couch DB查询限制

I'm working on couchdb in golang, I need to select the record with limit 1, I'm trying with the below mango query.

{"selector": {"$and": [{"memid": {"$gt": "null"}}, {"custid": {"$gt": "null"}}]},"limit" : 1}

The above query works well and good in fauxton on browser, but the same is not working in golang, all the results are coming without applying limit.

golang query:

queryString := fmt.Sprintf("{\"selector\": {\"$and\": [{\"memid\": {\"$gt\": \"%s\"}}, {\"custid\": {\"$gt\": \"%s\"}}]},\"limit\" : \"%d\"}", "null", "null",1)
queryResults, err := getQueryResultForQueryString(stub, queryString)

function definition for getQueryResultForQueryString:

func getQueryResultForQueryString(stub shim.ChaincodeStubInterface, queryString string) ([]byte, error) {

    fmt.Printf("- getQueryResultForQueryString queryString:
%s
", queryString)

    resultsIterator, err := stub.GetQueryResult(queryString)
    if err != nil {
        return nil, err
    }
    defer resultsIterator.Close()

    // buffer is a JSON array containing QueryRecords
    var buffer bytes.Buffer
    buffer.WriteString("[")

    bArrayMemberAlreadyWritten := false

    for resultsIterator.HasNext() {
        queryResponse, err := resultsIterator.Next()
        if err != nil {
            return nil, err
        }
        // Add a comma before array members, suppress it for the first array member
        if bArrayMemberAlreadyWritten == true {
            buffer.WriteString(",")
        }
        buffer.WriteString("{\"Key\":")
        buffer.WriteString("\"")
        buffer.WriteString(queryResponse.Key)
        buffer.WriteString("\"")

        buffer.WriteString(", \"Record\":")
        // Record is a JSON object, so we write as-is
        buffer.WriteString(string(queryResponse.Value))
        buffer.WriteString("}")
        bArrayMemberAlreadyWritten = true
    }
    buffer.WriteString("]")

    fmt.Printf("- getQueryResultForQueryString queryResult:
%s
", buffer.String())

    return buffer.Bytes(), nil
}

Please look at github.com/leesper/couchdb-golang

func (d *Database) Query(fields []string, selector string, sorts []string, limit, skip, index interface{}) ([]map[string]interface{}, error)