Skip to content

Commit

Permalink
Rename internal/cmd to internal/commands
Browse files Browse the repository at this point in the history
  • Loading branch information
edigaryev committed Jul 13, 2020
1 parent cfc6619 commit ad7efdc
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions cmd/cirrus/main.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package main

import (
"github.com/cirruslabs/cirrus-cli/internal/cmd"
"github.com/cirruslabs/cirrus-cli/internal/commands"
"log"
)

func main() {
if err := cmd.NewRootCmd().Execute(); err != nil {
if err := commands.NewRootCmd().Execute(); err != nil {
log.Fatal(err)
}
}
2 changes: 1 addition & 1 deletion internal/cmd/root.go → internal/commands/root.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cmd
package commands

import "github.com/spf13/cobra"

Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/validate.go → internal/commands/validate.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cmd
package commands

import (
"errors"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cmd_test
package commands_test

import (
"github.com/cirruslabs/cirrus-cli/internal/cmd"
"github.com/cirruslabs/cirrus-cli/internal/commands"
"github.com/stretchr/testify/assert"
"io/ioutil"
"os"
Expand Down Expand Up @@ -38,7 +38,7 @@ func tempChdir(t *testing.T) {
func TestValidateNoArgsNoFile(t *testing.T) {
tempChdir(t)

command := cmd.NewRootCmd()
command := commands.NewRootCmd()
command.SetArgs([]string{"validate", ""})
err := command.Execute()

Expand All @@ -52,7 +52,7 @@ func TestValidateNoArgsHasFile(t *testing.T) {
t.Fatal(err)
}

command := cmd.NewRootCmd()
command := commands.NewRootCmd()
command.SetArgs([]string{"validate", ""})
err := command.Execute()

Expand All @@ -67,7 +67,7 @@ func TestValidateFileArgHasFile(t *testing.T) {
t.Fatal(err)
}

command := cmd.NewRootCmd()
command := commands.NewRootCmd()
command.SetArgs([]string{"validate", "-f", "custom.yml"})
err := command.Execute()

Expand Down

0 comments on commit ad7efdc

Please sign in to comment.