Skip to content
New issue

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

Unable to marshal array (not slice) #130

Closed
gotwarlost opened this issue Oct 6, 2015 · 1 comment
Closed

Unable to marshal array (not slice) #130

gotwarlost opened this issue Oct 6, 2015 · 1 comment

Comments

@gotwarlost
Copy link

This code panics. (I was trying to marshal a docker container config object that has this construct)

package main

import (
    "gopkg.in/yaml.v2"
)

type Config struct {
    ConsoleSize [2]int
}

func main() {
    c := &Config{ConsoleSize: [2]int{10, 20}}
    yaml.Marshal(c)
}
@niemeyer
Copy link
Contributor

That's been fixed by the commit above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants