hash

package
v0.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package hash is a basic implementation of the hash data structure.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Table

type Table struct {
	// contains filtered or unexported fields
}

Table is a structured hash table.

func New

func New() *Table

New creates a hash table.

func (*Table) Get

func (h *Table) Get(key string) (value interface{}, err error)

Get returns the value for the specified key.

func (*Table) Keys

func (h *Table) Keys() (keys []string)

Keys returns a slice of all the keys in the HashTable.

func (*Table) Print

func (h *Table) Print()

func (*Table) Set

func (h *Table) Set(key string, value interface{})

Set allows you to set the value for a new item in a hash table.

func (*Table) Values

func (h *Table) Values() (values []interface{})

Values returns a slice of all the keys in the HashTable.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL