- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for CobraCommandWithOptions (0.37 sec)
-
pkg/version/cobra.go
// CobraCommand returns a command used to print version information. func CobraCommand() *cobra.Command { return CobraCommandWithOptions(CobraOptions{}) } // CobraCommandWithOptions returns a command used to print version information. // It accepts an CobraOptions argument that might modify its behavior func CobraCommandWithOptions(options CobraOptions) *cobra.Command { var ( short bool output string remote bool
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Aug 08 16:43:05 UTC 2023 - 6.1K bytes - Viewed (0) -
istioctl/pkg/version/version.go
istioVersion "istio.io/istio/pkg/version" ) func NewVersionCommand(ctx cli.Context) *cobra.Command { profileCmd := mesh.ProfileCmd(ctx) var opts clioptions.ControlPlaneOptions versionCmd := istioVersion.CobraCommandWithOptions(istioVersion.CobraOptions{ GetRemoteVersion: getRemoteInfoWrapper(ctx, &profileCmd, &opts), GetProxyVersions: getProxyInfoWrapper(ctx, &opts), }) opts.AttachControlPlaneFlags(versionCmd)
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Mar 15 01:18:49 UTC 2024 - 8.3K bytes - Viewed (0) -
pkg/version/cobra_test.go
"encoding/json" "fmt" "regexp" "strings" "testing" "github.com/spf13/cobra" "sigs.k8s.io/yaml" ) func TestOpts(t *testing.T) { ordinaryCmd := CobraCommand() remoteCmd := CobraCommandWithOptions( CobraOptions{GetRemoteVersion: mockRemoteMesh(&meshInfoMultiVersion, nil)}) cases := []struct { args string cmd *cobra.Command expectFail bool }{ { "version",
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Aug 29 14:15:26 UTC 2023 - 8.5K bytes - Viewed (0)