Marshal can't handle Arrays
Bug #1114499 reported by
James Lawrence
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
goyaml |
New
|
Undecided
|
Unassigned |
Bug Description
The marshal function can't handle types of reflect.Array.
import "launchpad.
import "fmt"
type A struct {
MyByteArray [10]byte
}
func main() {
example := A{MyByteArray: [10]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 0}}
data, err := goyaml.
if err != nil {
fmt.Println(err)
}
fmt.Println(data)
}
To post a comment you must log in.