Skip to content
This repository has been archived by the owner on Oct 2, 2020. It is now read-only.

README: Switch to travis-ci.com for badge #23

Merged
merged 4 commits into from
Apr 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ env:
- GO15VENDOREXPERIMENT=1

go:
- 1.7
- 1.8
- 1.9
- tip
- 1.11.x
- 1.12.x

cache:
directories:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ govet:

.PHONY: golint
golint:
@go get github.com/golang/lint/golint
@go get golang.org/x/lint/golint
$(eval LINT_LOG := $(shell mktemp -t golint.XXXXX))
@cat /dev/null > $(LINT_LOG)
@$(foreach pkg, $(PACKAGES), golint $(pkg) >> $(LINT_LOG) || true;)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Released under the [MIT License].
[MIT License]: LICENSE.txt
[doc-img]: https://godoc.org/github.com/uber-go/mapdecode?status.svg
[doc]: https://godoc.org/github.com/uber-go/mapdecode
[ci-img]: https://travis-ci.org/uber-go/mapdecode.svg?branch=master
[ci-img]: https://travis-ci.com/uber-go/mapdecode.svg?branch=master
[cov-img]: https://coveralls.io/repos/github/uber-go/mapdecode/badge.svg?branch=master
[ci]: https://travis-ci.org/uber-go/mapdecode
[ci]: https://travis-ci.com/uber-go/mapdecode
[cov]: https://coveralls.io/github/uber-go/mapdecode?branch=master
3 changes: 3 additions & 0 deletions decode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,9 @@ func TestFieldHook(t *testing.T) {
unexportedField string
}

// To prevent unused field errors.
_ = myStruct{unexportedField: "foo"}

typeOfInt := reflect.TypeOf(0)
typeOfString := reflect.TypeOf("hi")
typeOfPtrPtrString := reflect.PtrTo(reflect.PtrTo(typeOfString))
Expand Down
5 changes: 1 addition & 4 deletions hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@ import (
"github.com/uber-go/mapdecode/internal/mapstructure"
)

var (
_typeOfDuration = reflect.TypeOf(time.Duration(0))
_typeOfEmptyInterface = reflect.TypeOf((*interface{})(nil)).Elem()
)
var _typeOfDuration = reflect.TypeOf(time.Duration(0))

// FieldHookFunc is a hook called while decoding a specific struct field. It
// receives information about the target field, and the source data.
Expand Down