Skip to content

Commit

Permalink
Merge pull request #4 from taxintt/feat/implement-basic-list-cmd
Browse files Browse the repository at this point in the history
fix: modify cli name to tagli
  • Loading branch information
taxintt authored Jul 24, 2023
2 parents f12bc77 + b0c60dd commit d997070
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# git-tag-manager
# tagli
30 changes: 30 additions & 0 deletions cmd/list_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package cmd

import (
"testing"
)

func TestPrintPlainFormat(t *testing.T) {
plain := printPlainFormat(iter)
expected := `v1.0
v2.0
`
if plain != expected {
t.Errorf("Expected %s, got %s", expected, plain)
}
}

func TestPrintJsonFormat(t *testing.T) {
tags := make(map[string]string)
tags["v1.0"] = "1234567890"
tags["v2.0"] = "0987654321"

json := printJsonFormat(iter)
expected := `{
"v1.0": "1234567890",
"v2.0": "0987654321"
}`
if json != expected {
t.Errorf("Expected %s, got %s", expected, json)
}
}
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
)

var rootCmd = &cobra.Command{
Use: "git-tag-manager",
Use: "tagli",
Short: "CLI tool to handle Git Tag",
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ var (
)

func getVersion() string {
return fmt.Sprintf(`git-tag-manager
return fmt.Sprintf(`tagli
Version: %s
OS: %s
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/taxintt/git-tag-manager
module github.com/taxintt/tagli

go 1.19

Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Copyright © 2023 taxintt
*/
package main

import "github.com/taxintt/git-tag-manager/cmd"
import "github.com/taxintt/tagli/cmd"

func main() {
cmd.Execute()
Expand Down

0 comments on commit d997070

Please sign in to comment.