From 778934824750f0470e99068e72dab3cd41884880 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Mon, 8 Jan 2024 05:14:44 -0600 Subject: [PATCH] something less than nothing Signed-off-by: Jeff Carr --- .gitignore | 4 ++++ Makefile | 9 ++++----- main.go | 23 +++++++++++++++++++++++ 3 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 .gitignore create mode 100644 main.go diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3aa4127 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +* +!.gitignore +!Makefile +!*.go diff --git a/Makefile b/Makefile index 2215872..6403489 100644 --- a/Makefile +++ b/Makefile @@ -2,11 +2,10 @@ all: redomod: rm -f go.* - go mod init - go mod tidy + GO111MODULE= go mod init + GO111MODULE= go mod tidy filter-branch: # git filter-branch --index-filter "git rm --cached --ignore-unmatch path_to_unwanted_file" --prune-empty --tag-name-filter cat -- --all - git filter-branch --tree-filter 'rm plugin.go' HEAD - -git filter-branch --subdirectory-filter foodir -- --all + # git filter-branch --tree-filter 'rm plugin.go' HEAD + # git filter-branch --subdirectory-filter foodir -- --all diff --git a/main.go b/main.go new file mode 100644 index 0000000..649bce9 --- /dev/null +++ b/main.go @@ -0,0 +1,23 @@ +// This is a simple example +package "gui" + +import ( + "log" + "go.wit.com/gui/gui" +) + +func test() { + helloworld() + // This is just a optional goroutine to watch that things are alive + gui.Watchdog() +} + +// This creates a window +func helloworld() { + myGui := gui.New().Default() + myWindow := myGui.NewWindow("helloworld golang wit/gui window") + + myWindow.NewButton("hello", func () { + log.Println("world") + }) +}