Skip to content

Commit

Permalink
Move ./cmd/tool commands to a package
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
  • Loading branch information
vdemeester committed Jun 16, 2023
1 parent bd5d238 commit 5d9042f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
3 changes: 1 addition & 2 deletions cmd/tool/bump.go → cmd/tool/commands/bump.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// Package main is the main package :D
package main
package commands

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion cmd/tool/check.go → cmd/tool/commands/check.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package commands

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion cmd/tool/components.go → cmd/tool/commands/components.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package commands

import (
"fmt"
Expand Down
7 changes: 4 additions & 3 deletions cmd/tool/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (

"github.com/openshift-pipelines/pipelines-as-code/pkg/cli"
"github.com/spf13/cobra"
"github.com/tektoncd/operator/cmd/tool/commands"
)

func main() {
Expand All @@ -20,9 +21,9 @@ func main() {

ioStreams := cli.NewIOStreams()

cmd.AddCommand(BumpCommand(ioStreams))
cmd.AddCommand(CheckCommand(ioStreams))
cmd.AddCommand(ComponentVersionCommand(ioStreams))
cmd.AddCommand(commands.BumpCommand(ioStreams))
cmd.AddCommand(commands.CheckCommand(ioStreams))
cmd.AddCommand(commands.ComponentVersionCommand(ioStreams))

if err := cmd.Execute(); err != nil {
os.Exit(1)
Expand Down

0 comments on commit 5d9042f

Please sign in to comment.