Skip to content
Muhammad Usama edited this page Oct 9, 2023 · 5 revisions

peculiar-collections

GoDoc

This repository is designed to centralize collection implementations with most commonly used functionalities to remove redundancy of code and provide fine grained control over general operations

Peculiar-Collections v1.0.4 provides following implementations

  • Peculiar-Map - is an implementation of Map which preserves insertion order while using struct and exposes general functions for re-usability
  • Peculiar-List - is an implementation of slice/list which exposes general functions for re-usability
  • Peculiar-Linked-List - is an implementation of Linked-List with some general functions

NOTE: This repository requires GO Version >= 1.18

Installation

Import the package using the go get command

go get github.com/usama28232/peculiar-collections

For more information & usage, please check out the wiki section

Problem

In GO-lang, a map of struct does not guarantees insertion order while iterating over it, So I had to come up with a solution.

While I was at it, I felt the need to use some generics to make it a more useable solution for better usage

Hope that helps...