I want to convert a fixed size array from a slice:
func gen(bricks []Brick) {
if len(bricks) == 16 {
if check(Sculpture{bricks}) {
var b [16]Brick = bricks[0:16];
}
}
}
But this results in:
cannot use bricks[0:16] (type []Brick) as type [16]Brick in assignment
How to convert a slice into a fixed size array?