1
0
mirror of https://github.com/mappu/miqt.git synced 2025-01-09 00:48:38 +00:00
miqt/cmd/miqt-uic/main.go
2024-09-28 11:31:23 +12:00

35 lines
450 B
Go

package main
import (
"encoding/xml"
"fmt"
"io/ioutil"
)
func main() {
in, err := ioutil.ReadFile(`test.ui`)
if err != nil {
panic(err)
}
var parsed UiFile
err = xml.Unmarshal(in, &parsed)
if err != nil {
panic(err)
}
ret, err := xml.MarshalIndent(parsed, "", " ")
if err != nil {
panic(err)
}
fmt.Println(string(ret))
gosrc, err := generate("main", parsed)
if err != nil {
panic(err)
}
fmt.Println(string(gosrc))
}