Xstack is library for xstack layouts generation written in Go.
package main
import (
"bytes"
"fmt"
"github.com/video-audio/xstack"
)
// 0_0|w0_0|w0+w1_0|0_h0|w0_h0|w0+w1_h0|0_h0+h1|w0_h0+h1|w0+w1_h0+h1
func main() {
fmt.Println(xstack.Layout(9))
// or
b := bytes.Buffer{}
xstack.LayoutTo(&b, 9)
fmt.Println(b.String())
}