modulohash

package module
Version: v0.0.0-...-5bd1e2f Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2017 License: BSD-3-Clause Imports: 3 Imported by: 0

README

License BSD Go Report Card GoDoc Build Status

modulohash

Map a string in a list using CRC32.

Documentation

Overview

Package modulohash maps a string into a list using CRC32.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ModuloHash

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

ModuloHash is the list of targets.

func New

func New(targets []string) (*ModuloHash, error)

New is an alias to NewModuloHash.

func NewModuloHash

func NewModuloHash(targets []string) (*ModuloHash, error)

NewModuloHash will create a new ModuloHash.

func (*ModuloHash) Find

func (h *ModuloHash) Find(s string) (string, error)

Find will fairly determine a target value in the array Targets by using the crc32 hash value mod'd with the number of targets in the target list.

Source Files

Jump to

Keyboard shortcuts

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