From ce032c39313917d5841a094a35d3c31ed880ba60 Mon Sep 17 00:00:00 2001 From: ghosind Date: Sun, 4 Jun 2023 22:46:05 +0800 Subject: [PATCH] doc: update readme. --- README.md | 4 ++++ map.go | 1 + 2 files changed, 5 insertions(+) diff --git a/README.md b/README.md index a89869d..64aa645 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,10 @@ This package provides the following data structure interfaces and implementation - [`ConcurrentHashSet`](https://pkg.go.dev/github.com/ghosind/collection#ConcurrentHashSet): The thread safe implementation of Set based on Go built-in map structure. +- `Map`: A object that maps keys to values, and it cannot contain duplicate key. + + - [`HashMap`](https://pkg.go.dev/github.com/ghosind/collection#HashMap): The implementation of Map based on Go built-in map structure. + ## Installation You can install this package by the following command. diff --git a/map.go b/map.go index ed3c4f2..a2cf092 100644 --- a/map.go +++ b/map.go @@ -1,5 +1,6 @@ package collection +// Map is a object that maps keys to values, and it cannot contain duplicate key. type Map[K comparable, V any] interface { // Clear removes all key-value pairs in this map. Clear()