James King
eb3733d160
Replace LICENSE text with actual license ( #274 )
2017-08-12 13:00:11 -03:00
Roger Peppe
25c4ec802a
Merge pull request #272 from rogpeppe/005-cleaner-tag-scan
...
Make tag scanning code slightly cleaner.
2017-07-21 13:20:51 +01:00
Roger Peppe
e9bfed5956
Make tag scanning code slightly cleaner.
...
The current code uses "length" as a proxy for "has a tag"
but the length doesn't actually match the length of the
tag when there's a %-encoded character, so use a boolean
instead.
Also fix a panic found when trying to write a test for the change.
Aside: seems that %-encoded tag handles are not allowed by
the YAML spec.
2017-07-21 13:03:27 +01:00
Roger Peppe
670d4cfef0
Merge pull request #103 from andreychernih/bugfix/non-specific-tags
...
Fix for non-specific tags parsing
2017-07-21 12:36:24 +01:00
Roger Peppe
7ddc4634ce
Merge pull request #271 from rogpeppe/004-embedded-example
...
move embedded struct example into godoc
2017-07-21 11:09:56 +01:00
Roger Peppe
d56ec34a3d
move embedded struct example into godoc
...
Examples are nicer when they're shown in the godoc.
2017-07-21 10:26:57 +01:00
Roger Peppe
835086a6b6
Merge pull request #94 from mvo5/feature/embeded-structs-example
...
Add embedded structs example
2017-07-21 09:55:56 +01:00
Roger Peppe
3b4ad1db5b
Merge pull request #264 from hiveminded/v2
...
correct misspell
2017-07-13 21:15:20 +01:00
Roger Peppe
1be3d31502
Merge pull request #262 from wupeka/v2
...
Add UnmarshalStrict method returning error if yaml has fields that do not exist in structure
2017-07-12 06:45:46 +01:00
Witold Krecicki
f8db564a0a
Add UnmarshalStrict returning error if yaml has fields that do not exist in structure
2017-07-12 07:44:15 +02:00
Bill Q
e72f93569e
correct misspell on yamlh.go
2017-06-27 02:37:29 +03:00
Bill Q
f59f5e6702
fix misspell on emmiterc.go
2017-06-27 02:36:45 +03:00
Morgan Jones
cd8b52f826
Remove unreachable code to fix go vet ( #249 )
2017-04-07 14:21:22 -03:00
Aaron.L.Xu
a3f3340b58
Fix dead URL for yaml specification ( #240 )
2017-02-08 12:18:51 -02:00
Alex Harford
4c78c975fe
Tighten restrictions on float decoding ( #171 )
...
ParseFloat() accepts strings that contain digits with a single 'e'
character somewhere in the middle as valid floats. The YAML spec does
not accept these.
This causes problems especially when dealing with short commit hashes,
e.g. `123456e1`
2017-01-25 12:37:19 -02:00
Joe Tsai
14227de293
Fix decode test for Go 1.8 ( #217 )
...
An upstream change (http://golang.org/cl/31144 ) alters the time package
to be more consistent about the representation of UTC location.
We adjust the time.Time used in the test to work on both 1.7 and 1.8.
2017-01-24 14:25:11 -02:00
Gustavo Niemeyer
a5b47d31c5
Fix unmarshaler handling of empty strings.
2016-09-28 12:37:09 -03:00
Vasily Korytov
31c299268d
new license in the README file ( #189 )
...
New license in the README file.
2016-09-12 13:56:03 -03:00
Gustavo Niemeyer
e4d366fc3c
Updated LICENSE to Apache License 2.0.
2016-07-15 00:37:55 -03:00
Gustavo Niemeyer
a83829b6f1
Merge pull request #152 from mwhudson/go16-compat
...
Fix anonymous field handling for Go 1.6.
2016-03-01 17:40:22 -03:00
Gustavo Niemeyer
b6679148d2
Merge master.
2016-03-01 17:33:36 -03:00
Gustavo Niemeyer
d6c23fbaf1
Add .travis.yml
2016-03-01 17:32:01 -03:00
Gustavo Niemeyer
65622dcbf4
Merge pull request #151 from anthonyfok/v2-fix-typo
...
Fix typo: "uknown" => "unknown"
2016-03-01 17:26:45 -03:00
Michael Hudson-Doyle
406cad6bb4
make compatible with Go 1.6
...
As documented at http://tip.golang.org/doc/go1.6#reflect , the rules around
embedded unexported struct types containing exported fields are changing in Go
1.6. The same release notes explain how to change existing code, so do that.
2015-12-23 12:11:14 +13:00
Anthony Fok
a833012353
Fix typo: "uknown" → “unknown"
2015-12-20 07:16:50 -07:00
Gustavo Niemeyer
f7716cbe52
More UTF-16 test cases by John.
2015-12-01 14:27:45 -02:00
Gustavo Niemeyer
bd61a856f8
Fix UTF-16 LE and BE handling.
...
Thanks to John Lenton for the test cases.
2015-12-01 13:41:20 -02:00
Michael Vogt
e90bcf783f
add examples for decoding embedded structs
2015-09-24 17:04:41 +02:00
Gustavo Niemeyer
53feefa255
Merge pull request #119 from xtreme-sameer-vohra/v2
...
Fix typo in scannerc.go intendation->indentation.
2015-09-24 11:23:14 -03:00
Gustavo Niemeyer
2bf60357b8
Add simple example of field renaming.
...
Fixes #122 .
2015-09-24 10:30:18 -03:00
Gustavo Niemeyer
c325d146e4
Merge pull request #106 from realzeitmedia/gofmt
...
gofmt
2015-09-24 10:01:33 -03:00
Sameer Vohra
0516c53462
fixed typo in scannerc.go intendation->indentation
2015-08-18 14:29:51 -04:00
Gustavo Niemeyer
7ad95dd079
Fix omitempty support for floats.
2015-06-24 11:29:02 +01:00
Robert Vollmert
b9b22c4345
gofmt
2015-06-01 16:52:26 +02:00
Andrey Chernih
9eade332f0
Fix for non-specific tags parsing
2015-05-25 14:24:17 -07:00
Songmu
c1cd2254a6
fix bug: width() always returns width of first character!
2015-05-19 19:42:33 +09:00
Songmu
43a0256bb2
add failing test cases
2015-05-19 19:38:58 +09:00
Gustavo Niemeyer
49c95bdc21
Drop travis support. Not working and not missed.
2015-02-24 19:57:58 -03:00
Gustavo Niemeyer
d0fefed9b6
Fix timezone handling in time tests.
2015-02-24 19:53:31 -03:00
Gustavo Niemeyer
50f7813e6b
Add time.Time encoding/decoding test.
...
It's not clear this is actually the best way to handle time.Time,
since there is a standard yaml format that may not match time.Time's,
but having tests ensuring the current behavior is basically sane
is a good idea nevertheless.
2015-02-24 15:24:13 -03:00
Gustavo Niemeyer
a1c4bcb6c2
Merge pull request #76 from robx/patch-1
...
Balance parentheses.
2015-02-11 15:31:25 -02:00
Robert
df747160af
Balance parentheses.
2015-02-11 18:27:59 +01:00
Gustavo Niemeyer
ee2f4956ea
Merge pull request #72 from gogolok/travis_ci_support
...
Travis CI support.
2015-02-09 14:47:26 -02:00
Robert Gogolok
a347d2466e
README.md: travis ci build status
...
[ci skip]
2015-02-04 13:15:35 +01:00
Robert Gogolok
1d653a7376
travis ci
2015-02-04 13:11:21 +01:00
Gustavo Niemeyer
5d6f7e02b7
Support inline flag on a map field.
2015-01-19 16:55:52 -02:00
Gustavo Niemeyer
bef53efd0c
Add test ensuring [] decodes as zero-length slice.
...
Reported as #42 and previously fixed in 08859840 .
2015-01-16 18:20:57 -02:00
Gustavo Niemeyer
1bf6a7ce15
Do not call MarshalText on yaml.Marshaler.
...
Fixes #58 .
2015-01-16 17:58:22 -02:00
Gustavo Niemeyer
71e7ede9d4
Add test ensuring ": " values get quoted.
...
This was reported as PR #43 , but is not reproducible.
2015-01-16 17:22:23 -02:00
Gustavo Niemeyer
b7dfe2d918
Merge pull request #52 from BrianBland/v2
...
Fix TypeError check in Unmarshal.
2015-01-16 17:10:07 -02:00