Re: [go-nuts] How to prevent default sorting of map

2022-05-30 Thread 'Dan Kortschak' via golang-nuts
On Mon, 2022-05-30 at 08:23 -0700, Vejju Deepesh wrote: > I want know the method of preventing sorting by default and maintain > the map in the order of insertion If you want ordered return of elements and O(1) look-up, use a slice and an index map. Insertion becomes and appends and a map insertio

Re: [go-nuts] How to prevent default sorting of map

2022-05-30 Thread Ian Lance Taylor
On Mon, May 30, 2022 at 10:28 AM Vejju Deepesh wrote: > > I want know the method of preventing sorting by default and maintain the map > in the order of insertion The builtin map type does not support that. Sorry. Ian -- You received this message because you are subscribed to the Google Grou