Skip to content

Commit bdbadfd

Browse files
committed
clean names and dependencies
1 parent af6a765 commit bdbadfd

File tree

12 files changed

+18
-21
lines changed

12 files changed

+18
-21
lines changed

cmd/init.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ var initCmd = &cobra.Command{
5454
If no path is provided, it will initialize in the current directory.
5555
5656
Example:
57-
gopy init
58-
gopy init my-project
59-
gopy init --debug my-project
60-
gopy init -v my-project`,
57+
got init
58+
got init my-project
59+
got init --debug my-project
60+
got init -v my-project`,
6161
Run: func(cmd *cobra.Command, args []string) {
6262
// Get project path
6363
projectPath := "."
@@ -111,7 +111,7 @@ Example:
111111
fmt.Printf("\n%s\n", bold("Successfully initialized go-python project in "+projectPath))
112112
fmt.Println("\nNext steps:")
113113
fmt.Println("1. cd", projectPath)
114-
fmt.Println("2. gopy run .")
114+
fmt.Println("2. got run .")
115115
},
116116
}
117117

cmd/internal/create/create.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"github.com/fatih/color"
1313
)
1414

15-
//go:embed templates/*
15+
//go:embed _templates/*
1616
var templates embed.FS
1717

1818
var (
@@ -52,18 +52,18 @@ func Project(projectPath string, verbose bool) error {
5252
overwriteAll := false
5353

5454
// Walk through template files and copy them
55-
err := fs.WalkDir(templates, "templates", func(path string, d fs.DirEntry, err error) error {
55+
err := fs.WalkDir(templates, "_templates", func(path string, d fs.DirEntry, err error) error {
5656
if err != nil {
5757
return err
5858
}
5959

6060
// Skip the templates root directory
61-
if path == "templates" {
61+
if path == "_templates" {
6262
return nil
6363
}
6464

6565
// Get relative path from templates directory
66-
relPath, err := filepath.Rel("templates", path)
66+
relPath, err := filepath.Rel("_templates", path)
6767
if err != nil {
6868
return err
6969
}

cmd/internal/create/create_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
// setupTestDir creates a temporary directory for testing
1010
func setupTestDir(t *testing.T) string {
1111
t.Helper()
12-
dir, err := os.MkdirTemp("", "gopy-test-*")
12+
dir, err := os.MkdirTemp("", "got-test-*")
1313
if err != nil {
1414
t.Fatalf("failed to create temp dir: %v", err)
1515
}

cmd/internal/install/archive.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func getCacheDir() (string, error) {
2222
if err != nil {
2323
return "", fmt.Errorf("failed to get user home directory: %v", err)
2424
}
25-
cacheDir := filepath.Join(homeDir, ".gopy", "cache")
25+
cacheDir := filepath.Join(homeDir, ".got", "cache")
2626
if err := os.MkdirAll(cacheDir, 0755); err != nil {
2727
return "", fmt.Errorf("failed to create cache directory: %v", err)
2828
}

cmd/internal/install/deps.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func installGoDeps(projectPath string) error {
5454
}()
5555

5656
fmt.Println("Installing Go dependencies...")
57-
getCmd := exec.Command("go", "get", "-u", "github.com/gotray/got")
57+
getCmd := exec.Command("go", "mod", "tidy")
5858
getCmd.Stdout = os.Stdout
5959
getCmd.Stderr = os.Stderr
6060
if err := getCmd.Run(); err != nil {

cmd/internal/install/python_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ func TestGetCacheDir(t *testing.T) {
144144
return
145145
}
146146

147-
want := filepath.Join(tmpDir, ".gopy", "cache")
147+
want := filepath.Join(tmpDir, ".got", "cache")
148148
if got != want {
149149
t.Errorf("getCacheDir() = %v, want %v", got, want)
150150
}

cmd/internal/rungo/run.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func FindProjectRoot(dir string) (string, error) {
7676
}
7777
parentDir := filepath.Dir(dir)
7878
if parentDir == dir {
79-
return "", fmt.Errorf("failed to find Gopy project")
79+
return "", fmt.Errorf("failed to find Got project")
8080
}
8181
return FindProjectRoot(parentDir)
8282
}
@@ -89,7 +89,7 @@ func RunCommand(command string, args []string) error {
8989
}
9090
projectRoot, err := FindProjectRoot(wd)
9191
if err != nil {
92-
return fmt.Errorf("should run this command in a Gopy project: %v", err)
92+
return fmt.Errorf("should run this command in a Got project: %v", err)
9393
}
9494
env.SetBuildEnv(projectRoot)
9595

cmd/root.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ import (
1111

1212
// rootCmd represents the base command when called without any subcommands
1313
var rootCmd = &cobra.Command{
14-
Use: "gopy",
14+
Use: "got",
1515
Short: "A tool for building Go applications with Python integration",
16-
Long: `gopy is a command line tool that helps you build, run and manage Go applications
16+
Long: `got is a command line tool that helps you build, run and manage Go applications
1717
that integrate with Python.
1818
1919
It provides commands to:
@@ -23,7 +23,7 @@ It provides commands to:
2323
- Install Go packages with Python dependencies
2424
- Add or remove Python packages to/from your project
2525
26-
Use "gopy help [command]" for more information about a command.`,
26+
Use "got help [command]" for more information about a command.`,
2727
// Uncomment the following line if your bare application
2828
// has an action associated with it:
2929
// Run: func(cmd *cobra.Command, args []string) { },

go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ go 1.23.3
44

55
require (
66
github.com/fatih/color v1.18.0
7-
github.com/gotray/go-python v0.3.0
87
github.com/klauspost/compress v1.17.11
98
github.com/spf13/cobra v1.8.1
109
go.uber.org/zap v1.27.0

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
33
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
44
github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM=
55
github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU=
6-
github.com/gotray/go-python v0.3.0 h1:7NfFBdACraCkSOEUJqSA0q6LNtFSwOeO3axdNOtHqqI=
7-
github.com/gotray/go-python v0.3.0/go.mod h1:v4XHhlcdQJQPn4Dt+Ft4eFiL4vlsi5ZKboRCSUWe/xc=
86
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
97
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
108
github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc=

0 commit comments

Comments
 (0)