Skip to content
This repository was archived by the owner on Sep 6, 2025. It is now read-only.

Commit 730e295

Browse files
committed
Passing the context
1 parent 0a33e5d commit 730e295

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

cmd/hiring.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
package cmd
22

3-
import "github.com/spf13/cobra"
3+
import (
4+
"context"
5+
6+
"github.com/spf13/cobra"
7+
)
48

59
// NewHiringCmd aggregates the hiring comamnds
6-
func NewHiringCmd() *cobra.Command {
10+
func NewHiringCmd(ctx context.Context) *cobra.Command {
711
// Repo commands
812
cmd := &cobra.Command{
913
Use: "hiring",
1014
Short: "Github hiring tests repository management",
1115
}
1216

13-
cmd.AddCommand(NewHiringSendCmd())
14-
cmd.AddCommand(NewHiringUnseat())
17+
cmd.AddCommand(NewHiringSendCmd(ctx))
18+
cmd.AddCommand(NewHiringUnseat(ctx))
1519

1620
return cmd
1721
}

cmd/repo.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
package cmd
22

3-
import "github.com/spf13/cobra"
3+
import (
4+
"context"
5+
6+
"github.com/spf13/cobra"
7+
)
48

59
// NewRepoCmd aggregates the repo comamnds
6-
func NewRepoCmd() *cobra.Command {
10+
func NewRepoCmd(ctx context.Context) *cobra.Command {
711
// Repo commands
812
cmd := &cobra.Command{
913
Use: "repo",
1014
Short: "Github repository management",
1115
}
1216

13-
cmd.AddCommand(NewCreateRepoCmd())
14-
cmd.AddCommand(NewDeleteRepoCmd())
17+
cmd.AddCommand(NewCreateRepoCmd(ctx))
18+
cmd.AddCommand(NewDeleteRepoCmd(ctx))
1519

1620
return cmd
1721
}

0 commit comments

Comments
 (0)