From d0b4b99cd97a5db49f793afba1d9fd207b18b8cb Mon Sep 17 00:00:00 2001 From: pk Date: Wed, 11 Sep 2024 11:41:04 +0200 Subject: [PATCH] Restructure --- cmd/hoster_cli/hoster.go | 4 ++-- main.go | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 main.go diff --git a/cmd/hoster_cli/hoster.go b/cmd/hoster_cli/hoster.go index a96ceb2..d449ebc 100644 --- a/cmd/hoster_cli/hoster.go +++ b/cmd/hoster_cli/hoster.go @@ -1,4 +1,4 @@ -package main +package hoster_cli import ( "os" @@ -11,7 +11,7 @@ import ( "github.com/urfave/cli/v2" ) -func main() { +func Execute() { homeDir, err := os.UserHomeDir() if err != nil { golog.Fatalf("Error getting home directory: %v", err) diff --git a/main.go b/main.go new file mode 100644 index 0000000..94dc917 --- /dev/null +++ b/main.go @@ -0,0 +1,7 @@ +package main + +import "gitea.codeblob.work/pk/hoster/cmd/hoster_cli" + +func main() { + hoster_cli.Execute() +}