# \#go

**URL:** https://discuss.aerospike.com/tag/go/13.md

[Latest](https://discuss.aerospike.com/latest.md) · [Categories](https://discuss.aerospike.com/categories.md) · [Tags](https://discuss.aerospike.com/tags.md)

---

## [Ip ranges/CIDR](https://discuss.aerospike.com/t/ip-ranges-cidr/804)

<div class="topic-metadata">

**Author:** [@zac](https://discuss.aerospike.com/u/zac)\
**Replies:** 25\
**Last updated:** [January 24, 2025, 12:42pm UTC](https://discuss.aerospike.com/t/ip-ranges-cidr/804 "2025-01-24T12:42:26Z")

</div>

Hello ! How can I save IP ranges (ipv4/ipv6) / CIDR in AeroSpike , and search for specific IP Address in these ranges ? Thanks a lot ! Zac. e.g. example in Redis : store ip ranges in Redis - Stack Overflow

---

## [Error reading map from Aerospike record](https://discuss.aerospike.com/t/error-reading-map-from-aerospike-record/10674)

<div class="topic-metadata">

**Author:** [@dragondgold](https://discuss.aerospike.com/u/dragondgold)\
**Replies:** 6\
**Last updated:** [January 3, 2025, 5:52pm UTC](https://discuss.aerospike.com/t/error-reading-map-from-aerospike-record/10674 "2025-01-03T17:52:15Z")

</div>

I’m trying to read a record from an Aerospike cluster using the Go client library v5. When using GetObject() I can see a map in the returned bins (although an empty map, which is correct): Now, when trying to read int…

---

## [Partial writes to Aerospike Record when using Multiple Ops on a Record \[Go Client\]](https://discuss.aerospike.com/t/partial-writes-to-aerospike-record-when-using-multiple-ops-on-a-record-go-client/7970)

<div class="topic-metadata">

**Author:** [@amipatil](https://discuss.aerospike.com/u/amipatil)\
**Replies:** 7\
**Last updated:** [November 3, 2020, 6:29am UTC](https://discuss.aerospike.com/t/partial-writes-to-aerospike-record-when-using-multiple-ops-on-a-record-go-client/7970 "2020-11-03T06:29:54Z")

</div>

Context: We have Go application using Aerospike for storage. In one of the use case, we perform Multiple Ops on a Record to perform multiple writes on a single key in one batch request. This is in production since a few …

---

## [Can not connect to Aerospike from K8s cluster via k8 external Service](https://discuss.aerospike.com/t/can-not-connect-to-aerospike-from-k8s-cluster-via-k8-external-service/11420)

<div class="topic-metadata">

**Author:** [@Rupinder\_Guron](https://discuss.aerospike.com/u/Rupinder_Guron)\
**Replies:** 3\
**Last updated:** [September 6, 2024, 1:11pm UTC](https://discuss.aerospike.com/t/can-not-connect-to-aerospike-from-k8s-cluster-via-k8-external-service/11420 "2024-09-06T13:11:13Z")

</div>

Hi, I v created a K8s External Service to connect to Aerospike Cluster. Since in K8s External Service u cannot specify a port and External Service essentially creates a CNAME record. nslookup from a pod resolves the cna…

---

## [UNSUPPORTED\_FEATURE on aerospike server 6+](https://discuss.aerospike.com/t/unsupported-feature-on-aerospike-server-6/10782)

<div class="topic-metadata">

**Author:** [@Mazdak\_Mansouri](https://discuss.aerospike.com/u/Mazdak_Mansouri)\
**Replies:** 2\
**Last updated:** [January 23, 2024, 3:31pm UTC](https://discuss.aerospike.com/t/unsupported-feature-on-aerospike-server-6/10782 "2024-01-23T15:31:17Z")

</div>

When we upgrade to server 6.4+ from 5.0.0.4, we get unsupported\_feature error on all codes that we have with Secondary Index. Same code was working for server 5.X but not with 6.4+. The error appear on recordset.Error(). …

---

## [How to write test case for a function which has aerospike.RecordSet as a return value](https://discuss.aerospike.com/t/how-to-write-test-case-for-a-function-which-has-aerospike-recordset-as-a-return-value/10362)

<div class="topic-metadata">

**Author:** [@sanketchalke](https://discuss.aerospike.com/u/sanketchalke)\
**Replies:** 2\
**Last updated:** [August 2, 2023, 5:26pm UTC](https://discuss.aerospike.com/t/how-to-write-test-case-for-a-function-which-has-aerospike-recordset-as-a-return-value/10362 "2023-08-02T17:26:34Z")

</div>

Hi All, we are writing test cases for “GetListOfUsers()” function of “UserService.go“ file. We are facing issue in creating dummy aerospike.RecordSet object func (suite \*UserServiceTestSuite) TestGetListOfUsers() { …

---

## [Go client EOF error](https://discuss.aerospike.com/t/go-client-eof-error/10138)

<div class="topic-metadata">

**Author:** [@Ramakant\_Soni](https://discuss.aerospike.com/u/Ramakant_Soni)\
**Replies:** 3\
**Last updated:** [April 19, 2023, 3:09pm UTC](https://discuss.aerospike.com/t/go-client-eof-error/10138 "2023-04-19T15:09:30Z")

</div>

Hi everyone, I am randomly facing an issue whenever I am setting data corresponding to a aerospike key or while deleting any key. Error I am getting is EOF that’s all. And I am getting this error randomly and quite freq…

---

## [Union of many HLLs without retrieving them](https://discuss.aerospike.com/t/union-of-many-hlls-without-retrieving-them/10054)

<div class="topic-metadata">

**Author:** [@dragondgold](https://discuss.aerospike.com/u/dragondgold)\
**Replies:** 4\
**Last updated:** [March 4, 2023, 10:32am UTC](https://discuss.aerospike.com/t/union-of-many-hlls-without-retrieving-them/10054 "2023-03-04T10:32:29Z")

</div>

I’m currently making unions of many HLL structures (around 200) of 200KB using the get\_union method where I have to specify a key and a list of HLL structures I want to union. The main issue is that because I have to gi…

---

## [Apply HLL Union with externally provided HLL](https://discuss.aerospike.com/t/apply-hll-union-with-externally-provided-hll/9963)

<div class="topic-metadata">

**Author:** [@dragondgold](https://discuss.aerospike.com/u/dragondgold)\
**Replies:** 3\
**Last updated:** [January 14, 2023, 9:52pm UTC](https://discuss.aerospike.com/t/apply-hll-union-with-externally-provided-hll/9963 "2023-01-14T21:52:36Z")

</div>

Hi! I have a use case where I’m receiving a lot of ids at a very high rate and updating an HLL (with MinHash) key in Aerospike, the problem is it’s causing hot key errors due to the incoming speed of the events. I’m now…

---

## [Multiple cluster nodes is showing cluster timeout](https://discuss.aerospike.com/t/multiple-cluster-nodes-is-showing-cluster-timeout/9871)

<div class="topic-metadata">

**Author:** [@Arpit\_Mandloi](https://discuss.aerospike.com/u/Arpit_Mandloi)\
**Replies:** 1\
**Last updated:** [November 22, 2022, 5:04pm UTC](https://discuss.aerospike.com/t/multiple-cluster-nodes-is-showing-cluster-timeout/9871 "2022-11-22T17:04:35Z")

</div>

Client side code client, err := aerospike.NewClientWithPolicyAndHost(aerospike.NewClientPolicy(), aerospike.NewHost("127.0.0.1", 3000), aerospike.NewHost("127.0.0.1", 4000)) aerospike configs service { user root …

---

## [Does golang client library has support for document API with JsonPath query?](https://discuss.aerospike.com/t/does-golang-client-library-has-support-for-document-api-with-jsonpath-query/9775)

<div class="topic-metadata">

**Author:** [@monarch0111](https://discuss.aerospike.com/u/monarch0111)\
**Replies:** 1\
**Last updated:** [October 6, 2022, 10:44pm UTC](https://discuss.aerospike.com/t/does-golang-client-library-has-support-for-document-api-with-jsonpath-query/9775 "2022-10-06T22:44:18Z")

</div>

Hello, I am exploring a possible use case with Aerospike to query JSON documents stored using JsonPath. I have gone through the blog which mentions Java client support. I couldn’t find anything similar on golang client…

---

## [Mocking Aerospike in Go](https://discuss.aerospike.com/t/mocking-aerospike-in-go/9245)

<div class="topic-metadata">

**Author:** [@yashmaxnet](https://discuss.aerospike.com/u/yashmaxnet)\
**Replies:** 1\
**Last updated:** [February 26, 2022, 4:40pm UTC](https://discuss.aerospike.com/t/mocking-aerospike-in-go/9245 "2022-02-26T16:40:12Z")

</div>

Looking for ways to mock Aerospike APIs in unit testing, as per Go testing framework the functions to be mocked should be part of an interface, which means writing wrappers on top Aerospike Go client, is there any other …

---

## [Aerospike Operate API](https://discuss.aerospike.com/t/aerospike-operate-api/9018)

<div class="topic-metadata">

**Author:** [@Anil\_Kumawat](https://discuss.aerospike.com/u/Anil_Kumawat)\
**Replies:** 6\
**Last updated:** [November 23, 2021, 4:41pm UTC](https://discuss.aerospike.com/t/aerospike-operate-api/9018 "2021-11-23T16:41:26Z")

</div>

Not able to read the record via Operate API using aerospike go client . it always returns the generation id only despite adding GET Operation in the Operations List. Can someone help me here ? code snippet func (c \*Ae…

---

## [How to store value time.Time in Aerospike](https://discuss.aerospike.com/t/how-to-store-value-time-time-in-aerospike/8221)

<div class="topic-metadata">

**Author:** [@Isra](https://discuss.aerospike.com/u/Isra)\
**Replies:** 2\
**Last updated:** [February 11, 2021, 3:24am UTC](https://discuss.aerospike.com/t/how-to-store-value-time-time-in-aerospike/8221 "2021-02-11T03:24:38Z")

</div>

I’m using golang, I need to store value type of time.Time in Aerospike. details: -Authenticate At =\>\> -type: AuthenticatedAt sqlxx.NullTime \`json:"-" db:"authenticated\_at" as:"authenticat"\` type NullTime t…

---

## [Python code slow (10 seconds) vs go code fast (1 second) - help?](https://discuss.aerospike.com/t/python-code-slow-10-seconds-vs-go-code-fast-1-second-help/7987)

<div class="topic-metadata">

**Author:** [@Nadav\_Kremer](https://discuss.aerospike.com/u/Nadav_Kremer)\
**Replies:** 1\
**Last updated:** [November 7, 2020, 3:25pm UTC](https://discuss.aerospike.com/t/python-code-slow-10-seconds-vs-go-code-fast-1-second-help/7987 "2020-11-07T15:25:47Z")

</div>

Hi all, We are working with python and we want to start using aerospike. With the help of Aerospike we came up with a python code and go code that basically does the same but the python code is much much slower. Is there…

---

## [How to get Key from Query Records](https://discuss.aerospike.com/t/how-to-get-key-from-query-records/7707)

<div class="topic-metadata">

**Author:** [@cogewo5048](https://discuss.aerospike.com/u/cogewo5048)\
**Replies:** 1\
**Last updated:** [August 3, 2020, 8:09pm UTC](https://discuss.aerospike.com/t/how-to-get-key-from-query-records/7707 "2020-08-03T20:09:10Z")

</div>

I am only getting a hashed value of Key, and not the actual key. How to get the key? stmt := as.NewStatement("test", "new\_table") f := as.NewRangeFilter("rs", 200, 210) stmt.SetFilter(f) r, \_ := client.Query(readP…

---

## [Aerospike Go client: timed out issue](https://discuss.aerospike.com/t/aerospike-go-client-timed-out-issue/4292)

<div class="topic-metadata">

**Author:** [@nishant.nitjsr](https://discuss.aerospike.com/u/nishant.nitjsr)\
**Replies:** 2\
**Last updated:** [October 24, 2019, 7:38am UTC](https://discuss.aerospike.com/t/aerospike-go-client-timed-out-issue/4292 "2019-10-24T07:38:40Z")

</div>

I am using Aerospike go-client (v1.24.0). I have 10 node aerospike cluster (v3.8.1). I am getting frequent error message - E0621 09:59:01.457130 2514 Aerospike.go:32\] Unable to fetch from Aerospike : command execution t…

---

## [Bug while using go client](https://discuss.aerospike.com/t/bug-while-using-go-client/6090)

<div class="topic-metadata">

**Author:** [@Kamalesh\_P](https://discuss.aerospike.com/u/Kamalesh_P)\
**Replies:** 2\
**Last updated:** [April 7, 2019, 4:19am UTC](https://discuss.aerospike.com/t/bug-while-using-go-client/6090 "2019-04-07T04:19:30Z")

</div>

package main import ( "encoding/json" "fmt" "github.com/onsi/ginkgo" "github.com/aerospike/aerospike-client-go/go.geojson" //"github.com/go.geojson" "log" //"github.com/onsi/gomega" \_ "strings" as "github.co…

---

## [Cannot write geojson data in go-client](https://discuss.aerospike.com/t/cannot-write-geojson-data-in-go-client/6054)

<div class="topic-metadata">

**Author:** [@Kamalesh\_P](https://discuss.aerospike.com/u/Kamalesh_P)\
**Replies:** 7\
**Last updated:** [April 1, 2019, 10:34am UTC](https://discuss.aerospike.com/t/cannot-write-geojson-data-in-go-client/6054 "2019-04-01T10:34:45Z")

</div>

func main() { runRecord\_Entry(shared.Client) runOptimal\_Location(shared.Client) log.Println("Application ran successfully GrandMaster") } func runRecord\_Entry(client \*as.Client) { // define a client to connect to …

---

## [Cannot write geojson collection- go](https://discuss.aerospike.com/t/cannot-write-geojson-collection-go/6075)

<div class="topic-metadata">

**Author:** [@Kamalesh\_P](https://discuss.aerospike.com/u/Kamalesh_P)\
**Replies:** 0\
**Last updated:** [March 28, 2019, 8:32am UTC](https://discuss.aerospike.com/t/cannot-write-geojson-collection-go/6075 "2019-03-28T08:32:25Z")

</div>

I’m able to add individual geojson data but not a collection package main import ( "fmt" "log" \_ "strings" as "github.com/aerospike/aerospike-client-go" shared "github.com/aerospike/aerospike-client-go/examples/shared…

---

## [ScanAll and aql select timeout!](https://discuss.aerospike.com/t/scanall-and-aql-select-timeout/2938)

<div class="topic-metadata">

**Author:** [@javjar](https://discuss.aerospike.com/u/javjar)\
**Replies:** 13\
**Last updated:** [December 1, 2017, 4:33am UTC](https://discuss.aerospike.com/t/scanall-and-aql-select-timeout/2938 "2017-12-01T04:33:54Z")

</div>

Hey there, I’m getting timeouts (no matter what TIMEOUT is set to) when executing a scan. Using Go: Just gets to: “Printing…” Using AQL: INSERT INTO test.demo (PK, foo, bar) VALUES (‘key1’, 123, ‘abc’) SHOW SETS …

---

## [Iterating through records is slow](https://discuss.aerospike.com/t/iterating-through-records-is-slow/4596)

<div class="topic-metadata">

**Author:** [@Robert\_Griesmeyer](https://discuss.aerospike.com/u/Robert_Griesmeyer)\
**Replies:** 6\
**Last updated:** [September 24, 2017, 3:07am UTC](https://discuss.aerospike.com/t/iterating-through-records-is-slow/4596 "2017-09-24T03:07:42Z")

</div>

I’m reading from the Result channel in golang and I’m not able to loop through the records fast enough. I’m running the following query in aql: SELECT JobID FROM search.jobEmbeddings WHERE Location WITHIN CAST('{"type"…

---

## [General Config for go client](https://discuss.aerospike.com/t/general-config-for-go-client/4384)

<div class="topic-metadata">

**Author:** [@Ajay\_Bodhe](https://discuss.aerospike.com/u/Ajay_Bodhe)\
**Replies:** 0\
**Last updated:** [July 13, 2017, 7:04am UTC](https://discuss.aerospike.com/t/general-config-for-go-client/4384 "2017-07-13T07:04:38Z")

</div>

I am going to use aerospike in project that I am going to build for personal use. Let me know what configuration I should use for GOLANG client esp this is going to be highly concurrent application with serving 2k-5k reu…

---

## [Difference between SendKey being True and false](https://discuss.aerospike.com/t/difference-between-sendkey-being-true-and-false/4318)

<div class="topic-metadata">

**Author:** [@Radhika\_Hs](https://discuss.aerospike.com/u/Radhika_Hs)\
**Replies:** 1\
**Last updated:** [June 30, 2017, 3:08pm UTC](https://discuss.aerospike.com/t/difference-between-sendkey-being-true-and-false/4318 "2017-06-30T15:08:53Z")

</div>

Hi I’m trying understand the purpose of policy SendKey=true/false (writepolicy) I tried putting a record using Golang library of aerospike with policy.SendKey as true and even as false. When I get those records(using aer…

---

## [Aerogo/aerospike: Alternative high-level API client](https://discuss.aerospike.com/t/aerogo-aerospike-alternative-high-level-api-client/4294)

<div class="topic-metadata">

**Author:** [@blitzprog](https://discuss.aerospike.com/u/blitzprog)\
**Replies:** 0\
**Last updated:** [June 22, 2017, 2:25pm UTC](https://discuss.aerospike.com/t/aerogo-aerospike-alternative-high-level-api-client/4294 "2017-06-22T14:25:23Z")

</div>

I made this recently because I wanted to automate the creation of my REST API via reflection. If you’re interested and need something like this, feel free to check it out!

---

## [Prefix lookup for keys?](https://discuss.aerospike.com/t/prefix-lookup-for-keys/3998)

<div class="topic-metadata">

**Author:** [@clusc](https://discuss.aerospike.com/u/clusc)\
**Replies:** 0\
**Last updated:** [March 27, 2017, 11:07pm UTC](https://discuss.aerospike.com/t/prefix-lookup-for-keys/3998 "2017-03-27T23:07:21Z")

</div>

Hi, I’d like to query for records based on key prefix, how would I do it? I saw the new Predicate Filtering which I can define a string prefix, is this the only way to achieve it? Specifically I don’t see it available i…

---

## [Large list order Go client](https://discuss.aerospike.com/t/large-list-order-go-client/2772)

<div class="topic-metadata">

**Author:** [@lime008](https://discuss.aerospike.com/u/lime008)\
**Replies:** 1\
**Last updated:** [April 5, 2016, 12:49am UTC](https://discuss.aerospike.com/t/large-list-order-go-client/2772 "2016-04-05T00:49:43Z")

</div>

Hi, In a large ordered list I can implement the paging with FindFirst method and then get more items by calling FindFrom with the last item from the previous list of items. So I was wondering, if I use a timestamp to ord…

---

## [Atomic Operations on List and Map Data Types - C, Java, and Go clients](https://discuss.aerospike.com/t/atomic-operations-on-list-and-map-data-types-c-java-and-go-clients/332)

<div class="topic-metadata">

**Author:** [@alyssa\_nodeprime\_com](https://discuss.aerospike.com/u/alyssa_nodeprime_com)\
**Replies:** 4\
**Last updated:** [March 31, 2016, 7:16pm UTC](https://discuss.aerospike.com/t/atomic-operations-on-list-and-map-data-types-c-java-and-go-clients/332 "2016-03-31T19:16:37Z")

</div>

Hi, Are there native ways to work with list and map data types (not LDTs) using the C, Java, and Go clients? If not, is this on the roadmap? I’m hoping to see similar atomic operations as are available for the LDT versi…

---

## [\[resolved\] \[aerospike-server 3.6.3 \] System Shutdown With Panic : runtime error: index out of range](https://discuss.aerospike.com/t/resolved-aerospike-server-3-6-3-system-shutdown-with-panic-runtime-error-index-out-of-range/2181)

<div class="topic-metadata">

**Author:** [@jinxiao](https://discuss.aerospike.com/u/jinxiao)\
**Replies:** 5\
**Last updated:** [November 25, 2015, 7:58pm UTC](https://discuss.aerospike.com/t/resolved-aerospike-server-3-6-3-system-shutdown-with-panic-runtime-error-index-out-of-range/2181 "2015-11-25T19:58:09Z")

</div>

The Panic StackTrace Is As Follow : goroutine 42 \[running\]: github.com/aerospike/aerospike-client-go.(Node).addFriends(0xc8200e3970, 0xc8217071d0, 0x0, 0x0, 0x0, 0x0, 0x0) /home/figo/develop/env/GOPATH/src/github.com/a…

---

## [Build project failure](https://discuss.aerospike.com/t/build-project-failure/1745)

<div class="topic-metadata">

**Author:** [@Anton\_Ukolov](https://discuss.aerospike.com/u/Anton_Ukolov)\
**Replies:** 6\
**Last updated:** [September 7, 2015, 5:43pm UTC](https://discuss.aerospike.com/t/build-project-failure/1745 "2015-09-07T17:43:03Z")

</div>

Hi All! I’m trying to build project of our company on my laptop. cd project\_dir go build then i get this error: # github.com/aerospike/aerospike-client-go/types/atomic /home/sugar/go/src/github.com/aerospike/aerospik…

[Next page](https://discuss.aerospike.com/tag/go/13.md?match_all_tags=true&page=1&tags%5B%5D=go)
