summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/spf13/cast
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/spf13/cast')
-rw-r--r--vendor/github.com/spf13/cast/.travis.yml1
-rw-r--r--vendor/github.com/spf13/cast/Makefile4
-rw-r--r--vendor/github.com/spf13/cast/caste.go10
3 files changed, 9 insertions, 6 deletions
diff --git a/vendor/github.com/spf13/cast/.travis.yml b/vendor/github.com/spf13/cast/.travis.yml
index 6420d1c2..833a4879 100644
--- a/vendor/github.com/spf13/cast/.travis.yml
+++ b/vendor/github.com/spf13/cast/.travis.yml
@@ -4,6 +4,7 @@ env:
sudo: required
go:
- "1.11.x"
+ - "1.12.x"
- tip
os:
- linux
diff --git a/vendor/github.com/spf13/cast/Makefile b/vendor/github.com/spf13/cast/Makefile
index 7ccf8930..f01a5dbb 100644
--- a/vendor/github.com/spf13/cast/Makefile
+++ b/vendor/github.com/spf13/cast/Makefile
@@ -1,4 +1,4 @@
-# A Self-Documenting Makefile: http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
+GOVERSION := $(shell go version | cut -d ' ' -f 3 | cut -d '.' -f 2)
.PHONY: check fmt lint test test-race vet test-cover-html help
.DEFAULT_GOAL := help
@@ -12,11 +12,13 @@ test-race: ## Run tests with race detector
go test -race ./...
fmt: ## Run gofmt linter
+ifeq "$(GOVERSION)" "12"
@for d in `go list` ; do \
if [ "`gofmt -l -s $$GOPATH/src/$$d | tee /dev/stderr`" ]; then \
echo "^ improperly formatted go files" && echo && exit 1; \
fi \
done
+endif
lint: ## Run golint linter
@for d in `go list` ; do \
diff --git a/vendor/github.com/spf13/cast/caste.go b/vendor/github.com/spf13/cast/caste.go
index a4859fb0..70c7291b 100644
--- a/vendor/github.com/spf13/cast/caste.go
+++ b/vendor/github.com/spf13/cast/caste.go
@@ -819,15 +819,15 @@ func ToStringE(i interface{}) (string, error) {
case int8:
return strconv.FormatInt(int64(s), 10), nil
case uint:
- return strconv.FormatInt(int64(s), 10), nil
+ return strconv.FormatUint(uint64(s), 10), nil
case uint64:
- return strconv.FormatInt(int64(s), 10), nil
+ return strconv.FormatUint(uint64(s), 10), nil
case uint32:
- return strconv.FormatInt(int64(s), 10), nil
+ return strconv.FormatUint(uint64(s), 10), nil
case uint16:
- return strconv.FormatInt(int64(s), 10), nil
+ return strconv.FormatUint(uint64(s), 10), nil
case uint8:
- return strconv.FormatInt(int64(s), 10), nil
+ return strconv.FormatUint(uint64(s), 10), nil
case []byte:
return string(s), nil
case template.HTML: