Skip to content

Commit

Permalink
Add go.mod
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
AlekSi authored and dustin committed Jul 5, 2021
1 parent afde56e commit 249ff6c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
sudo: false
language: go
go_import_path: github.com/dustin/go-humanize
go:
- 1.3.x
- 1.5.x
- 1.6.x
- 1.7.x
- 1.8.x
- 1.9.x
- 1.13.x
- 1.14.x
- 1.15.x
- 1.16.x
- stable
- master
matrix:
allow_failures:
Expand All @@ -15,7 +15,7 @@ matrix:
install:
- # 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).
script:
- go get -t -v ./...
- diff -u <(echo -n) <(gofmt -d -s .)
- go tool vet .
- go vet .
- go install -v -race ./...
- go test -v -race ./...
1 change: 1 addition & 0 deletions commaf.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build go1.6
// +build go1.6

package humanize
Expand Down
1 change: 1 addition & 0 deletions commaf_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build go1.6
// +build go1.6

package humanize
Expand Down
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/dustin/go-humanize

go 1.16

0 comments on commit 249ff6c

Please sign in to comment.