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") + }) +}