3 Commits

Author SHA1 Message Date
pk
d0b4b99cd9 Restructure 2024-09-11 11:41:04 +02:00
pk
34fa69d58e Bump version 2024-09-11 11:31:05 +02:00
pk
7d9d5e3a58 Change package name to make go install work. 2024-09-11 11:30:48 +02:00
7 changed files with 25 additions and 13 deletions

View File

@ -3,11 +3,12 @@ package commands
import (
"context"
"fmt"
"hoster/internals/conf"
"io/fs"
"path/filepath"
"strings"
"gitea.codeblob.work/pk/hoster/internals/conf"
dc "github.com/compose-spec/compose-go/v2/cli"
"github.com/urfave/cli/v2"
)

View File

@ -2,14 +2,15 @@ package commands
import (
"fmt"
"hoster/internals/conf"
"hoster/internals/helpers"
"hoster/internals/templates"
"hoster/internals/types"
"os"
"path/filepath"
"slices"
"gitea.codeblob.work/pk/hoster/internals/conf"
"gitea.codeblob.work/pk/hoster/internals/helpers"
"gitea.codeblob.work/pk/hoster/internals/templates"
"gitea.codeblob.work/pk/hoster/internals/types"
"github.com/gookit/goutil/fsutil"
"github.com/gookit/goutil/sysutil/cmdr"
"github.com/kataras/golog"

View File

@ -1,16 +1,17 @@
package main
package hoster_cli
import (
"hoster/cmd/hoster_cli/commands"
"hoster/internals/conf"
"os"
"path/filepath"
"gitea.codeblob.work/pk/hoster/cmd/hoster_cli/commands"
"gitea.codeblob.work/pk/hoster/internals/conf"
"github.com/kataras/golog"
"github.com/urfave/cli/v2"
)
func main() {
func Execute() {
homeDir, err := os.UserHomeDir()
if err != nil {
golog.Fatalf("Error getting home directory: %v", err)
@ -21,7 +22,7 @@ func main() {
app := &cli.App{
Name: "hoster",
Usage: "Hoster",
Version: "1.0.2",
Version: "1.0.3",
Commands: []*cli.Command{
{
Name: "new",

2
go.mod
View File

@ -1,4 +1,4 @@
module hoster
module gitea.codeblob.work/pk/hoster
go 1.23.0

View File

@ -2,13 +2,14 @@ package helpers
import (
"bufio"
"hoster/internals/types"
"io/fs"
"os"
"regexp"
"strconv"
"strings"
"gitea.codeblob.work/pk/hoster/internals/types"
"github.com/gookit/goutil/fsutil"
)

View File

@ -3,11 +3,12 @@ package templates
import (
_ "embed"
"fmt"
"hoster/internals/conf"
"os"
"path/filepath"
"text/template"
"gitea.codeblob.work/pk/hoster/internals/conf"
"github.com/gookit/goutil/fsutil"
)

7
main.go Normal file
View File

@ -0,0 +1,7 @@
package main
import "gitea.codeblob.work/pk/hoster/cmd/hoster_cli"
func main() {
hoster_cli.Execute()
}