Skip to content

Commit 249ff6c

Browse files
AlekSidustin
authored andcommitted
Add go.mod
Converting this package to Go modules makes it easier to use module proxies, etc. Additionally, bump Go versions in Travis CI configuration, and add new //go:build directives (https://tip.golang.org/cmd/go/#hdr-Build_constraints).
1 parent afde56e commit 249ff6c

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

Diff for: .travis.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
sudo: false
22
language: go
3+
go_import_path: github.com/dustin/go-humanize
34
go:
4-
- 1.3.x
5-
- 1.5.x
6-
- 1.6.x
7-
- 1.7.x
8-
- 1.8.x
9-
- 1.9.x
5+
- 1.13.x
6+
- 1.14.x
7+
- 1.15.x
8+
- 1.16.x
9+
- stable
1010
- master
1111
matrix:
1212
allow_failures:
@@ -15,7 +15,7 @@ matrix:
1515
install:
1616
- # Do nothing. This is needed to prevent default install action "go get -t -v ./..." from happening here (we want it to happen inside script step).
1717
script:
18-
- go get -t -v ./...
1918
- diff -u <(echo -n) <(gofmt -d -s .)
20-
- go tool vet .
19+
- go vet .
20+
- go install -v -race ./...
2121
- go test -v -race ./...

Diff for: commaf.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build go1.6
12
// +build go1.6
23

34
package humanize

Diff for: commaf_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build go1.6
12
// +build go1.6
23

34
package humanize

Diff for: go.mod

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module github.com/dustin/go-humanize
2+
3+
go 1.16

0 commit comments

Comments
 (0)