From d7787e5cde01a8c4f40fe48d68ba3f089e075d71 Mon Sep 17 00:00:00 2001 From: Nguyen Le Anh Tuan Date: Sun, 9 Jun 2024 14:03:28 +0700 Subject: [PATCH] Test publish module --- .gitignore | 1 + README.md | 4 ++-- cmd/new/main.go | 7 +++++++ main_test.go | 1 - main.go => new.go | 4 ++-- new_test.go | 7 +++++++ 6 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 .gitignore create mode 100644 cmd/new/main.go delete mode 100644 main_test.go rename main.go => new.go (62%) create mode 100644 new_test.go diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1d74e21 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.vscode/ diff --git a/README.md b/README.md index 3103246..7e6cba0 100644 --- a/README.md +++ b/README.md @@ -38,13 +38,13 @@ new dir/ new dir/sub1/ # Multiple files & directories -new file2.go "folder2/{{file2,file3}.go,file4.txt}" +new folder2/{{file2,file3}.go,file4.txt} ``` # Installation ```go -go install github.com/dynonguyen/new-cli +go install github.com/dynonguyen/new-cli/cmd/new@latest ``` # Usage diff --git a/cmd/new/main.go b/cmd/new/main.go new file mode 100644 index 0000000..d97209d --- /dev/null +++ b/cmd/new/main.go @@ -0,0 +1,7 @@ +package main + +import newcli "github.com/dynonguyen/new-cli" + +func main() { + newcli.Run() +} diff --git a/main_test.go b/main_test.go deleted file mode 100644 index 06ab7d0..0000000 --- a/main_test.go +++ /dev/null @@ -1 +0,0 @@ -package main diff --git a/main.go b/new.go similarity index 62% rename from main.go rename to new.go index a5ed763..b54baf1 100644 --- a/main.go +++ b/new.go @@ -1,7 +1,7 @@ -package main +package newcli import "fmt" -func main() { +func Run() { fmt.Println("HELLO NEW CLI") } diff --git a/new_test.go b/new_test.go new file mode 100644 index 0000000..6c7e3c5 --- /dev/null +++ b/new_test.go @@ -0,0 +1,7 @@ +package newcli + +import "testing" + +func TestNew(t *testing.T) { + +}