From 9ad174381083e778b478f39e1f5f86900b45e032 Mon Sep 17 00:00:00 2001 From: qowevisa Date: Fri, 2 Aug 2024 00:03:51 +0300 Subject: [PATCH] Cmd test sub packages --- cmd/cfyne/main.go | 13 +++++++++++++ cmd/http-server/main.go | 19 +++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 cmd/cfyne/main.go create mode 100644 cmd/http-server/main.go diff --git a/cmd/cfyne/main.go b/cmd/cfyne/main.go new file mode 100644 index 0000000..a8770df --- /dev/null +++ b/cmd/cfyne/main.go @@ -0,0 +1,13 @@ +package main + +import ( + "fyne.io/fyne/v2/app" + "fyne.io/fyne/v2/widget" +) + +func main() { + myApp := app.New() + myWindow := myApp.NewWindow("Hello") + myWindow.SetContent(widget.NewLabel("Hello, Fyne!")) + myWindow.ShowAndRun() +} diff --git a/cmd/http-server/main.go b/cmd/http-server/main.go new file mode 100644 index 0000000..c00980a --- /dev/null +++ b/cmd/http-server/main.go @@ -0,0 +1,19 @@ +package main + +import ( + "fmt" + "net/http" + + "git.qowevisa.me/Qowevisa/gonuts/db" +) + +func main() { + dbc := db.Connect() + if dbc != nil { + fmt.Printf("yay\n") + } + http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { + fmt.Fprintf(w, "Hello, World!") + }) + http.ListenAndServe(":8080", nil) +}