Skip to content

Commit

Permalink
feat: hide sub commands from package exports
Browse files Browse the repository at this point in the history
  • Loading branch information
bcho committed Dec 18, 2023
1 parent 53630c2 commit 659b526
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions pkg/cmd/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"k8s.io/client-go/tools/clientcmd"
)

// NewConvertCmd provides a cobra command for convert sub command
func NewConvertCmd() *cobra.Command {
// newConvertCmd provides a cobra command for convert sub command
func newConvertCmd() *cobra.Command {
o := converter.New()

cmd := &cobra.Command{
Expand Down
4 changes: 2 additions & 2 deletions pkg/cmd/removetokencache.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
klog "k8s.io/klog/v2"
)

// NewRemoveTokenCacheCmd provides a cobra command for removing token cache sub command
func NewRemoveTokenCacheCmd() *cobra.Command {
// newRemoveTokenCacheCmd provides a cobra command for removing token cache sub command
func newRemoveTokenCacheCmd() *cobra.Command {
var tokenCacheDir string

cmd := &cobra.Command{
Expand Down
6 changes: 3 additions & 3 deletions pkg/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ func NewRootCmd(version string) *cobra.Command {
},
}

cmd.AddCommand(NewConvertCmd())
cmd.AddCommand(NewTokenCmd())
cmd.AddCommand(NewRemoveTokenCacheCmd())
cmd.AddCommand(newConvertCmd())
cmd.AddCommand(newTokenCmd())
cmd.AddCommand(newRemoveTokenCacheCmd())

return cmd
}
4 changes: 2 additions & 2 deletions pkg/cmd/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"github.com/spf13/cobra"
)

// NewTokenCmd provides a cobra command for convert sub command
func NewTokenCmd() *cobra.Command {
// newTokenCmd provides a cobra command for convert sub command
func newTokenCmd() *cobra.Command {
o := token.NewOptions()

cmd := &cobra.Command{
Expand Down

0 comments on commit 659b526

Please sign in to comment.