Skip to content

Commit 7e541de

Browse files
committed
Some cleanup
1 parent ea58127 commit 7e541de

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

cmd/troubleshoot/cli/analyze.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ import (
55
"encoding/json"
66
"fmt"
77

8-
"gopkg.in/yaml.v2"
98
analyzer "github.com/replicatedhq/troubleshoot/pkg/analyze"
109
"github.com/replicatedhq/troubleshoot/pkg/convert"
1110
"github.com/replicatedhq/troubleshoot/pkg/logger"
1211
"github.com/spf13/cobra"
1312
"github.com/spf13/viper"
13+
"gopkg.in/yaml.v2"
1414
)
1515

1616
func Analyze() *cobra.Command {
@@ -61,10 +61,11 @@ func Analyze() *cobra.Command {
6161
}
6262

6363
cmd.Flags().String("url", "", "URL of the support bundle to analyze")
64+
cmd.MarkFlagRequired("url")
6465
cmd.Flags().String("output", "", "output format: json, yaml")
6566
cmd.Flags().String("compatibility", "", "output compatibility mode: support-bundle")
67+
cmd.Flags().MarkHidden("compatibility")
6668
cmd.Flags().Bool("quiet", false, "enable/disable error messaging and only show parseable output")
67-
cmd.MarkFlagRequired("url")
6869

6970
viper.BindPFlags(cmd.Flags())
7071

cmd/troubleshoot/cli/version.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ func writeVersionFile(path string) (string, error) {
1111
version := troubleshootv1beta1.SupportBundleVersion{
1212
ApiVersion: "troubleshoot.replicated.com/v1beta1",
1313
Kind: "SupportBundle",
14-
LayoutVersion: "0.0.1",
1514
}
1615
b, err := yaml.Marshal(version)
1716
if err != nil {

pkg/analyze/download.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ func extractTroubleshootBundle(reader io.Reader, destDir string) error {
121121
}
122122

123123
func getTroubleshootAnalyzers() ([]*troubleshootv1beta1.Analyze, error) {
124-
specURL := `https://gist.githubusercontent.com/divolgin/92b512ad4697c7255f383a7c1b56fd83/raw/troubleshoot_v1beta1_preflight.yaml`
124+
specURL := `https://gist.githubusercontent.com/divolgin/92b512ad4697c7255f383a7c1b56fd83/raw`
125125
resp, err := http.Get(specURL)
126126
if err != nil {
127127
return nil, err

pkg/apis/troubleshoot/v1beta1/version.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ package v1beta1
33
type SupportBundleVersion struct {
44
ApiVersion string `json:"apiVersion" yaml:"apiVersion"`
55
Kind string `json:"kind" yaml:"kind"`
6-
LayoutVersion string `json:"layoutVersion" yaml:"layoutVersion"`
76
}

0 commit comments

Comments
 (0)