Skip to content

Commit 8952122

Browse files
committed
fix #17: rename cmd and cnf to command and config respectively
1 parent caba0d8 commit 8952122

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.

internal/cmd/root.go renamed to internal/command/root.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
package cmd
1+
package command
22

33
import (
44
"github.com/spf13/cobra"
55

6-
"tool/internal/cmd/demo"
6+
"tool/internal/command/demo"
77
)
88

99
// New returns the new root command.

internal/cmd/root_test.go renamed to internal/command/root_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
package cmd_test
1+
package command_test
22

33
import (
44
"testing"
55

66
"github.com/stretchr/testify/assert"
77
"github.com/stretchr/testify/require"
88

9-
. "tool/internal/cmd"
9+
. "tool/internal/command"
1010
)
1111

1212
func TestNew(t *testing.T) {

internal/cnf/features.go renamed to internal/config/features.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package cnf
1+
package config
22

33
import "go.octolab.org/toolkit/config"
44

main.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import (
1212
"go.octolab.org/toolkit/cli/cobra"
1313
"go.octolab.org/unsafe"
1414

15-
"tool/internal/cmd"
16-
"tool/internal/cnf"
15+
"tool/internal/command"
16+
"tool/internal/config"
1717
)
1818

1919
const unknown = "unknown"
@@ -38,11 +38,11 @@ func main() {
3838
ctx, cancel := context.WithCancel(context.Background())
3939
defer cancel()
4040

41-
root := cmd.New()
41+
root := command.New()
4242
root.SetErr(stderr)
4343
root.SetOut(stdout)
4444
root.AddCommand(
45-
cobra.NewVersionCommand(version, date, commit, cnf.Features...),
45+
cobra.NewVersionCommand(version, date, commit, config.Features...),
4646
)
4747

4848
safe.Do(func() error { return root.ExecuteContext(ctx) }, shutdown)

0 commit comments

Comments
 (0)