Skip to content

Commit 24211a2

Browse files
authored
Merge pull request #58 from mfridman/master
Adds module support with /v2 import suffix
2 parents 4f009a4 + fa939a3 commit 24211a2

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

README.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@ under MIT License (same as the original implementations)
99
Original implementations by [Ivan Akimov](https://github.com/ivanakimov)
1010

1111
### Setup
12-
<pre>go get github.com/speps/go-hashids</pre>
12+
<pre>go get github.com/speps/go-hashids/v2</pre>
1313

1414
CLI tool :
1515

16-
<pre>go get github.com/speps/go-hashids/cmd/hashid</pre>
16+
<pre>go get github.com/speps/go-hashids/v2/cmd/hashid</pre>
1717

1818
### Example
1919
```go
2020
package main
2121

2222
import "fmt"
23-
import "github.com/speps/go-hashids"
23+
import "github.com/speps/go-hashids/v2"
2424

2525
func main() {
2626
hd := hashids.NewData()
@@ -54,6 +54,10 @@ Let me know if I forgot anyone of course.
5454

5555
### Changelog
5656

57+
2021/05/04
58+
59+
* v2.0.1 - Added module support with /v2 suffix
60+
5761
2017/05/09
5862

5963
* Changed API

cmd/hashid/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"strconv"
88
"strings"
99

10-
"github.com/speps/go-hashids"
10+
"github.com/speps/go-hashids/v2"
1111
)
1212

1313
func main() {

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
module github.com/speps/go-hashids
1+
module github.com/speps/go-hashids/v2
22

33
go 1.14

hashids.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Go implementation of http://www.hashids.org under MIT license
22
// Generates hashes from an array of integers, eg. for YouTube like hashes
3-
// Setup: go get github.com/speps/go-hashids
3+
// Setup: go get github.com/speps/go-hashids/v2
44
// Original implementations by Ivan Akimov at https://github.com/ivanakimov
55
// Thanks to Rémy Oudompheng and Peter Hellberg for code review and fixes
66

0 commit comments

Comments
 (0)