Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mtchavez/jenkins
Golang Jenkins Hash
https://github.com/mtchavez/jenkins
go hashing jenkins
Last synced: 8 days ago
JSON representation
Golang Jenkins Hash
- Host: GitHub
- URL: https://github.com/mtchavez/jenkins
- Owner: mtchavez
- License: mit
- Created: 2013-04-29T02:45:15.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2017-08-27T23:31:24.000Z (over 7 years ago)
- Last Synced: 2024-12-01T03:22:31.677Z (2 months ago)
- Topics: go, hashing, jenkins
- Language: Go
- Homepage:
- Size: 16.6 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Jenkins Hash
[![Latest Version](http://img.shields.io/github/release/mtchavez/jenkins.svg?style=flat-square)](https://github.com/mtchavez/jenkins/releases)
[![Build Status](https://travis-ci.org/mtchavez/jenkins.svg?branch=master)](https://travis-ci.org/mtchavez/jenkins)
[![Go Documentation](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)](http://godoc.org/github.com/mtchavez/jenkins)
[![Coverage Status](https://coveralls.io/repos/github/mtchavez/jenkins/badge.svg)](https://coveralls.io/github/mtchavez/jenkins)
[![Go Report Card](https://goreportcard.com/badge/github.com/mtchavez/jenkins)](https://goreportcard.com/report/github.com/mtchavez/jenkins)Golang Jenkins hash
## Install
`go get -u github.com/mtchavez/jenkins`
## Usage
Jenkins conforms to the [Hash32](http://golang.org/pkg/hash/#Hash32) interface from the Go standard library
```go
// 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][ginkgo] and [Gomega][gomega] for testing.
Run via `make test` which will run `go test -cover`
## Documentation
Docs on [godoc](http://godoc.org/github.com/mtchavez/jenkins)
[ginkgo]: https://github.com/onsi/ginkgo
[gomega]: https://github.com/onsi/gomega