Skip to content

mtchavez/jenkins

Repository files navigation

Jenkins Hash

Latest Version Build Status Go Documentation Coverage Status Go Report Card

Golang Jenkins hash

Install

go get -u github.com/mtchavez/jenkins

Usage

Jenkins conforms to the Hash32 interface from the Go standard library

// Create a new hash
jenkhash := New()

// Write a string of bytes to hash
key := []byte("my-random-key")
length, err := jenkhash(key)

// Get uint32 sum of hash
sum := jenkhash.Sum32()

// Sum hash with byte string
sumbytes := jenkhash.Sum(key)

Testing

Uses Ginkgo and Gomega for testing.

Run via make test which will run go test -cover

Documentation

Docs on godoc