MCPcopy Index your code
hub / github.com/GetStream/stream-cli / GetRootCmdWithSubCommands

Function GetRootCmdWithSubCommands

test/helpers.go:29–40  ·  view source on GitHub ↗
(c ...*cobra.Command)

Source from the content-addressed store, hash-verified

27}
28
29func GetRootCmdWithSubCommands(c ...*cobra.Command) *cobra.Command {
30 prepareViperConfig()
31
32 rootCmd := &cobra.Command{}
33 rootCmd.PersistentFlags().String("app", "", "app name")
34 rootCmd.AddCommand(c...)
35 rootCmd.SetIn(&bytes.Buffer{})
36 rootCmd.SetOut(&bytes.Buffer{})
37 rootCmd.SetErr(&bytes.Buffer{})
38
39 return rootCmd
40}
41
42func InitClient() *stream.Client {
43 c, err := stream.NewClientFromEnvVars()

Callers 15

TestCreateTokenFunction · 0.92
TestUpsertUserFunction · 0.92
TestUpdateUserPartialFunction · 0.92
TestDeleteUserFunction · 0.92
TestDeleteMultipleUsersFunction · 0.92
TestQueryUserFunction · 0.92
TestRevokeTokenFunction · 0.92
TestBanUnbanUserFunction · 0.92
TestDeactivateReactivateFunction · 0.92
TestMuteUnmuteFunction · 0.92
TestFlagFunction · 0.92
TestPushTestFunction · 0.92

Calls 2

prepareViperConfigFunction · 0.85
StringMethod · 0.80

Tested by 15

TestCreateTokenFunction · 0.74
TestUpsertUserFunction · 0.74
TestUpdateUserPartialFunction · 0.74
TestDeleteUserFunction · 0.74
TestDeleteMultipleUsersFunction · 0.74
TestQueryUserFunction · 0.74
TestRevokeTokenFunction · 0.74
TestBanUnbanUserFunction · 0.74
TestDeactivateReactivateFunction · 0.74
TestMuteUnmuteFunction · 0.74
TestFlagFunction · 0.74
TestPushTestFunction · 0.74