Re: [go-nuts] The result of yaml.Unmarshal() is different between osX and linux

2018-03-16 Thread Yuichi Sawada
Thank you for your pointing out. This problem is occur by the difference of yaml veresion. When I use same version of YAML, I got same results. In Mac I use commit d670f9405373e636a5a2765eea47fac0c9bc91a4 (HEAD -> v2, origin/v2, origin/master, origin/HEAD) Merge: 1244d3c 1f1f618 Author: Roger P

Re: [go-nuts] The result of yaml.Unmarshal() is different between osX and linux

2018-03-16 Thread roger peppe
I was more interested in the specific version of yaml you were using. What does this command print for you on each platform? git --git-dir $(go list -f '{{.Dir}}' gopkg.in/yaml.v2)/.git log -1 (I'm assuming you use the bash shell). thanks. rog. On 16 March 2018 at 15:24, Yuichi Sawada wr

Re: [go-nuts] The result of yaml.Unmarshal() is different between osX and linux

2018-03-16 Thread Yuichi Sawada
> > Thank you for your message. I tried to exec with back-quoted string and check git hash number again. The code which I ran is package main import ( "fmt" yaml "gopkg.in/yaml.v2" ) type Sample struct { Namespace string `yaml:"namespace"` Namestring `yaml:"name"` Description stri

Re: [go-nuts] The result of yaml.Unmarshal() is different between osX and linux

2018-03-16 Thread roger peppe
Could you please create a self-contained example where the YAML is inside the code itself (use a back-quoted string containing the YAML)? Also, could you please confirm the git commit hashes of the YAML you're using on each platform? If you're using a different version on each platform, please co

Re: [go-nuts] The result of yaml.Unmarshal() is different between osX and linux

2018-03-16 Thread Jakob Borg
You’re getting an error on the file read. Print the error to see what it is, instead of a hardcoded string. On 16 Mar 2018, at 08:24, dev.ys084...@gmail.com wrote: Recently I started to use golang in project and I got one problem. The problem is the result of yam

Re: [go-nuts] The result of yaml.Unmarshal() is different between osX and linux

2018-03-16 Thread Lutz Horn
package main import ( "fmt" "io/ioutil" "os" yaml "gopkg.in/yaml.v2" ) type [...] This is hard to read. Please post your code with proper line breaks. Lutz -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop

[go-nuts] The result of yaml.Unmarshal() is different between osX and linux

2018-03-16 Thread dev . ys084743
Recently I started to use golang in project and I got one problem. The problem is the result of yaml.Unmarshal when I put invalid yaml is different between osX and linux. My environments are here macOS Sierra 10.12.6 go version go1.10 darwin/amd64 Linux version 3.10.0-693.11.6.el7.x86_64 go