Skip to content

Commit

Permalink
Public methods and cmd var. module signature changing.
Browse files Browse the repository at this point in the history
  • Loading branch information
smgladkovskiy committed Oct 27, 2021
1 parent c562264 commit bfe739d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
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/spacetab-io/commands
module github.com/spacetab-io/commands-go

go 1.16

Expand Down
12 changes: 6 additions & 6 deletions migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ const (
)

var (
// migrateCmd is a github.com/pressly/goose database migrate wrapper command
// MigrateCmd is a github.com/pressly/goose database migrate wrapper command
// nolint:deadcode,unused,varcheck
migrateCmd = &cobra.Command{
MigrateCmd = &cobra.Command{
Use: "migrate",
Short: "Database migrations command",
ValidArgs: []string{"up", "up-by-one", "up-to", "create", "down", "down-to", "fix", "redo", "reset", "status", "version"},
Expand All @@ -33,10 +33,10 @@ var (
ErrBadContextValue = errors.New("context value is empty or has wrong type")
)

// migrateUsage shows command usage.
// Add it to migrateCmd like migrateCmd.SetUsageFunc(migrateUsage).
// MigrateUsage shows command usage.
// Add it to MigrateCmd like MigrateCmd.SetUsageFunc(MigrateUsage).
// nolint:deadcode,unused
func migrateUsage(cmd *cobra.Command) error {
func MigrateUsage(cmd *cobra.Command) error {
w := cmd.OutOrStderr()
_, err := w.Write([]byte(`Usage:
<service> migrate [args]
Expand All @@ -46,7 +46,7 @@ Args:
down migrate last migration down
`))

return fmt.Errorf("migrateUsage err: %w", err)
return fmt.Errorf("MigrateUsage err: %w", err)
}

const errStrFormat = "%s %s error: %w"
Expand Down

0 comments on commit bfe739d

Please sign in to comment.