We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug When a string contains simple quote and [ symbol, the simple quote is encoded with double single quote
To Reproduce
main.go
package main import ( "os" "gopkg.in/yaml.v2" ) type Test struct { Name string `yaml:"name"` Test string `yaml:"test"` } func main() { test := Test{ Name: "NAME", Test: "['value', 'value2']", } out, err := yaml.Marshal(test) if err != nil { panic(err) } err = os.WriteFile("test.yaml", out, 0644) if err != nil { panic(err) } }
test.yaml
name: NAME test: '[''value'', ''value2'']'
Expected behavior
name: NAME test: "['value', 'value2']"
Version Variables
The text was updated successfully, but these errors were encountered:
I just see that there are two differents go-yaml package the official one and yours, sorry the issue does not concern your package. I close
Sorry, something went wrong.
No branches or pull requests
Describe the bug
When a string contains simple quote and [ symbol, the simple quote is encoded with double single quote
To Reproduce
main.go
test.yaml
Expected behavior
test.yaml
Version Variables
The text was updated successfully, but these errors were encountered: