madhusri mannuru
madhusri mannuru

Reputation: 41

How to acheive the order of insetion in nested maps using golang

In my project we are using nested map

map[string]map[string]map[string]string 

for insertion of the data into cache.

While preparing the data the db data has to be compared with the cache data(nested map data).
Here is the concern: we need order of insertion to be preserved in this nested map.

Upvotes: -3

Views: 127

Answers (1)

VonC
VonC

Reputation: 1324417

This is in relation with your previous question, and you need to check why the order would need to be preserved.

Comparing map in Go does not depend on the order, and Go runtime does not maintain the iteration orders for maps.

Upvotes: 0

Related Questions