sophuwu.site > melgody
forked project to be a terminal music player
sophuwu sophie@sophuwu.site
Sat, 08 Jul 2023 02:22:44 +0200
commit

f552efcd2252889aa92e0d6aa6657503b0eb5b25

parent

46f2658f5243bccf3cf038948bee778cf857cc0c

1 files changed, 2 insertions(+), 24 deletions(-)

jump to
M main.gomain.go

@@ -1,29 +1,7 @@

package main -import ( - g "github.com/AllenDang/giu" - "time" -) - -var s string - -func gui() { - g.SingleWindow().Layout( - g.Label("Hello world from giu. Press the button:"), - g.Button("Press me!").OnClick(func() { - go func() { - for _, x := range "hello from giu" { - s = s + string(x) - g.Update() - time.Sleep(time.Millisecond * 100) - } - }() - }), - g.Label(s), - ) -} +import "fmt" func main() { - wnd := g.NewMasterWindow("Hello world", 600, 400, 0) - wnd.Run(gui) + fmt.Println("Welcome to Melgody! Now Playing:") }