godeps: remove unused github.com/mtchavez/jenkins
License: MIT Signed-off-by: Lars Gierth <larsg@systemli.org>
Lars Gierth committed
Oct 30, 2017 at 12:16 UTC
5206a111767d193b4750d435e4e9a91b0eb01580
8 files changed
-253
Godeps/Godeps.json
-4
@@ -49,10 +49,6 @@
49
"ImportPath": "github.com/mitchellh/go-homedir",
50
"Rev": "1f6da4a72e57d4e7edd4a7295a585e0a3999a2d4"
51
},
52
- {
53
- "ImportPath": "github.com/mtchavez/jenkins",
54
- "Rev": "5a816af6ef21ef401bff5e4b7dd255d63400f497"
55
- },
52
{
53
"ImportPath": "github.com/syndtr/gosnappy/snappy",
54
"Rev": "156a073208e131d7d2e212cb749feae7c339e846"
Godeps/_workspace/src/github.com/mtchavez/jenkins/.gitignore
deleted
-23
@@ -1,23 +0,0 @@
1
-# Compiled Object files, Static and Dynamic libs (Shared Objects)
2
-*.o
3
-*.a
4
-*.so
5
-
6
-# Folders
7
-_obj
8
-_test
9
-
10
-# Architecture specific extensions/prefixes
11
-*.[568vq]
12
-[568vq].out
13
-
14
-*.cgo1.go
15
-*.cgo2.c
16
-_cgo_defun.c
17
-_cgo_gotypes.go
18
-_cgo_export.*
19
-
20
-_testmain.go
21
-
22
-*.exe
23
-*.test
Godeps/_workspace/src/github.com/mtchavez/jenkins/.travis.yml
deleted
-8
@@ -1,8 +0,0 @@
1
-go:
2
- - 1.1
3
- - tip
4
-install:
5
- - go get github.com/onsi/ginkgo
6
- - go get github.com/onsi/gomega
7
-before_script: go test -i ./...
8
-script: go test ./...
Godeps/_workspace/src/github.com/mtchavez/jenkins/Makefile
deleted
-11
@@ -1,11 +0,0 @@
1
-build:
2
- go build jenkins.go
3
-
4
-run:
5
- go run jenkins.go
6
-
7
-test:
8
- go test -cover
9
-
10
-default:
11
- go run jenkins.go
Godeps/_workspace/src/github.com/mtchavez/jenkins/README.md
deleted
-45
@@ -1,45 +0,0 @@
1
-Jenkins
2
-=================
3
-
4
-Golang Jenkins hash
5
-
6
-[](https://travis-ci.org/mtchavez/go-jenkins-hashes)
7
-
8
-## Install
9
-
10
-`go get -u github.com/mtchavez/jenkins`
11
-
12
-## Usage
13
-
14
-Jenkins follows the [Hash32](http://golang.org/pkg/hash/#Hash32) interface from the Go standard library
15
-
16
-```go
17
-// Create a new hash
18
-jenkhash := New()
19
-
20
-// Write a string of bytes to hash
21
-key := []byte("my-random-key")
22
-length, err := jenkhash(key)
23
-
24
-// Get uint32 sum of hash
25
-sum := jenkhash.Sum32()
26
-
27
-// Sum hash with byte string
28
-sumbytes := jenkhash.Sum(key)
29
-```
30
-
31
-## Testing
32
-
33
-Uses [Ginkgo](http://onsi.github.io/ginkgo/) for testing.
34
-
35
-Run via `make test` which will run `go test -cover`
36
-
37
-## Documentation
38
-
39
-Docs on [godoc](http://godoc.org/github.com/mtchavez/jenkins)
40
-
41
-## License
42
-
43
-Written by Chavez
44
-
45
-Released under the MIT License: http://www.opensource.org/licenses/mit-license.php
Godeps/_workspace/src/github.com/mtchavez/jenkins/jenkins.go
deleted
-48
@@ -1,48 +0,0 @@
1
-package jenkins
2
-
3
-import "hash"
4
-
5
-type jenkhash uint32
6
-
7
-func New() hash.Hash32 {
8
- var j jenkhash = 0
9
- return &j
10
-}
11
-
12
-func (j *jenkhash) Write(key []byte) (int, error) {
13
- hash := *j
14
-
15
- for _, b := range key {
16
- hash += jenkhash(b)
17
- hash += (hash << 10)
18
- hash ^= (hash >> 6)
19
- }
20
-
21
- hash += (hash << 3)
22
- hash ^= (hash >> 11)
23
- hash += (hash << 15)
24
-
25
- *j = hash
26
- return len(key), nil
27
-}
28
-
29
-func (j *jenkhash) Reset() {
30
- *j = 0
31
-}
32
-
33
-func (j *jenkhash) Size() int {
34
- return 4
35
-}
36
-
37
-func (j *jenkhash) BlockSize() int {
38
- return 1
39
-}
40
-
41
-func (j *jenkhash) Sum32() uint32 {
42
- return uint32(*j)
43
-}
44
-
45
-func (j *jenkhash) Sum(in []byte) []byte {
46
- v := j.Sum32()
47
- return append(in, byte(v>>24), byte(v>>16), byte(v>>8), byte(v))
48
-}
Godeps/_workspace/src/github.com/mtchavez/jenkins/jenkins_suite_test.go
deleted
-13
@@ -1,13 +0,0 @@
1
-package jenkins
2
-
3
-import (
4
- . "github.com/onsi/ginkgo"
5
- . "github.com/onsi/gomega"
6
-
7
- "testing"
8
-)
9
-
10
-func TestJenkins(t *testing.T) {
11
- RegisterFailHandler(Fail)
12
- RunSpecs(t, "Jenkins Suite")
13
-}
Godeps/_workspace/src/github.com/mtchavez/jenkins/jenkins_test.go
deleted
-101
@@ -1,101 +0,0 @@
1
-package jenkins
2
-
3
-import (
4
- . "github.com/onsi/ginkgo"
5
- . "github.com/onsi/gomega"
6
- "hash"
7
-)
8
-
9
-var _ = Describe("Jenkins", func() {
10
-
11
- var jhash hash.Hash32
12
- var key []byte
13
-
14
- BeforeEach(func() {
15
- jhash = New()
16
- key = []byte("Apple")
17
- })
18
-
19
- Describe("New", func() {
20
-
21
- It("returns jenkhash", func() {
22
- var h *jenkhash
23
- Expect(jhash).To(BeAssignableToTypeOf(h))
24
- })
25
-
26
- It("initializes offset to 0", func() {
27
- Expect(jhash.Sum32()).To(Equal(uint32(0)))
28
- })
29
- })
30
-
31
- Describe("Write", func() {
32
-
33
- It("returns key length", func() {
34
- length, _ := jhash.Write(key)
35
- Expect(length).To(Equal(5))
36
- })
37
-
38
- It("has no error", func() {
39
- _, err := jhash.Write(key)
40
- Expect(err).To(BeNil())
41
- })
42
-
43
- })
44
-
45
- Describe("Reset", func() {
46
-
47
- It("sets back to 0", func() {
48
- Expect(jhash.Sum32()).To(Equal(uint32(0)))
49
- jhash.Write(key)
50
- Expect(jhash.Sum32()).NotTo(Equal(uint32(0)))
51
- jhash.Reset()
52
- Expect(jhash.Sum32()).To(Equal(uint32(0)))
53
- })
54
-
55
- })
56
-
57
- Describe("Size", func() {
58
-
59
- It("is 4", func() {
60
- Expect(jhash.Size()).To(Equal(4))
61
- })
62
-
63
- })
64
-
65
- Describe("BlockSize", func() {
66
-
67
- It("is 1", func() {
68
- Expect(jhash.BlockSize()).To(Equal(1))
69
- })
70
-
71
- })
72
-
73
- Describe("Sum32", func() {
74
-
75
- It("defaults to 0", func() {
76
- Expect(jhash.Sum32()).To(Equal(uint32(0)))
77
- })
78
-
79
- It("sums hash", func() {
80
- jhash.Write(key)
81
- Expect(jhash.Sum32()).To(Equal(uint32(884782484)))
82
- })
83
-
84
- })
85
-
86
- Describe("Sum", func() {
87
-
88
- It("default 0 hash byte returned", func() {
89
- expected := []byte{0x41, 0x70, 0x70, 0x6c, 0x65, 0x0, 0x0, 0x0, 0x0}
90
- Expect(jhash.Sum(key)).To(Equal(expected))
91
- })
92
-
93
- It("returns sum byte array", func() {
94
- jhash.Write(key)
95
- expected := []byte{0x41, 0x70, 0x70, 0x6c, 0x65, 0x34, 0xbc, 0xb5, 0x94}
96
- Expect(jhash.Sum(key)).To(Equal(expected))
97
- })
98
-
99
- })
100
-
101
-})