Bjørn Erik Pedersen
8c9545af88
Fix Travis build
pirms 5 gadiem
Theofanis Despoudis
4dd38b8b57
Add support for map of int64 and map of int
pirms 5 gadiem
Ben Orchard
efb632f0f6
tests: +date tests for RFC3339 no TZ colon cases
pirms 5 gadiem
Xavier Vello
8965335b8c
Add TestToDurationSliceE cases to reach 100% coverage
pirms 6 gadiem
Xavier Vello
9ebc15c905
Add support for maps defined as a json string
pirms 6 gadiem
Roman Volosatovs
acbeb36b90
Add ToDurationSlice()
pirms 7 gadiem
Cameron Moore
758cd85768
Error on unsigned conversions of negative values
pirms 7 gadiem
Cameron Moore
d37435d953
Add additional type conversions
Adds float32, uint, uint64, uint32, uint16, and uint8 throughout.
Fixes #33
pirms 7 gadiem
Cameron Moore
df9611b942
Refactor tests to get full coverage
Test coverage goes from 75.6% to 100%
pirms 7 gadiem
Cameron Moore
2c719d95d6
Fix gofmt and golint errors
pirms 7 gadiem
chyeh
e4f8127058
Add `ToInt8`, `ToInt16` and `ToInt32`
pirms 7 gadiem
Cameron Moore
f820543c35
Fix regression in StringToDate
In commit d1139ba, I removed a date format for "RFC3339 without T" that
I misidentified as a reduntant format. This commit adds it back with a
test.
pirms 7 gadiem
Cameron Moore
d1139bab1c
Add missing time formats and tests
Add missing time formats, remove duplicate formats, and test all
supported formats.
pirms 7 gadiem
Cameron Moore
56a7ecbeb1
Add Unix epoch support to ToTimeE
pirms 7 gadiem
emacsist
24b6558033
Add "yyyy-MM-dd HH:mm:ss" string format
pirms 7 gadiem
Bjørn Erik Pedersen
7c3adfba29
Add benchmark for ToBool
```
BenchmarkTooBool-4 500000 2781 ns/op 49 B/op 3 allocs/op
```
pirms 7 gadiem
M@
60e7a69a42
Add ToBoolSlice()
Fixes #1
pirms 7 gadiem
Chih-Hung Yeh
fa673d63c1
Fixe `ToDurationE()`
It used to return zero valeus in some cases. The details are described
in [this issue](https://github.com/spf13/viper/issues/203 ). More cases
were also added in the unit test `TestToDuration()`
pirms 7 gadiem
Feng
4532b05430
FIx ToStringMapStringSliceE
* Update caste.go
bug fix
json config, for example:
{ "test" : ["abc", "123"] }
* update test
pirms 7 gadiem
Bjørn Erik Pedersen
27b586b42e
Add support for the other html template types
pirms 8 gadiem
Matt Keller
0eed3d1b35
Add a ToInt64() and necessary plumbing
pirms 8 gadiem
Matt Keller
7c7add0129
Add ability to cast int64's to strings
Resolves #18
pirms 8 gadiem
Cyrill Schumacher
ee7b3e0353
Add bool case to ToStringE
pirms 8 gadiem
Tyler Power
6770a32f65
Add int64 and float64 type coercion in ToDuration
pirms 8 gadiem
jackspirou
d7ba796a5f
adding unit tests for ToStringMapString and ToStringMapStringSlice methods
pirms 8 gadiem
bep
893a4154d1
Add support for template.URL
Fixes #13
pirms 9 gadiem
bep
4d07383ffe
Make ToIntSliceE more flexible
Now it accepts any slice or array type that contains a type supported by ToIntE.
[close #12 ]
pirms 9 gadiem
bep
2c4fdb5416
Add ToIntSlice
pirms 9 gadiem
spf13
2318c5caf2
Add support for pointers to basic types
pirms 9 gadiem
spf13
421411cf35
Add proper support for error -> string and Stringer -> string.
pirms 9 gadiem
bep
0a58809502
Add support for HTML to String
pirms 9 gadiem
txgruppi
ed6dd5ade6
Updated to return bool false only for zero
pirms 9 gadiem
bep
bbe2d4b35d
Add ToStringMapBool
ToStringMapBool is useful for a map of flags in a configuration file.
pirms 9 gadiem
Romain Baugue
075c75a269
Added ToBool case for string, and added ToBool test cases
pirms 9 gadiem
spf13
5a9b0d4cc3
adding Int to Float. Testing for float
pirms 10 gadiem
spf13
559d57776b
Writing the README. Handling a few more cases, adding more tests.
pirms 10 gadiem
spf13
6796452c69
initial commit of library & tests
pirms 10 gadiem