Skip to content

Commit

Permalink
Some cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
divolgin committed Jul 31, 2019
1 parent ea58127 commit 7e541de
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
5 changes: 3 additions & 2 deletions cmd/troubleshoot/cli/analyze.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import (
"encoding/json"
"fmt"

"gopkg.in/yaml.v2"
analyzer "github.com/replicatedhq/troubleshoot/pkg/analyze"
"github.com/replicatedhq/troubleshoot/pkg/convert"
"github.com/replicatedhq/troubleshoot/pkg/logger"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"gopkg.in/yaml.v2"
)

func Analyze() *cobra.Command {
Expand Down Expand Up @@ -61,10 +61,11 @@ func Analyze() *cobra.Command {
}

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

viper.BindPFlags(cmd.Flags())

Expand Down
1 change: 0 additions & 1 deletion cmd/troubleshoot/cli/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ func writeVersionFile(path string) (string, error) {
version := troubleshootv1beta1.SupportBundleVersion{
ApiVersion: "troubleshoot.replicated.com/v1beta1",
Kind: "SupportBundle",
LayoutVersion: "0.0.1",
}
b, err := yaml.Marshal(version)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/analyze/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func extractTroubleshootBundle(reader io.Reader, destDir string) error {
}

func getTroubleshootAnalyzers() ([]*troubleshootv1beta1.Analyze, error) {
specURL := `https://gist.githubusercontent.com/divolgin/92b512ad4697c7255f383a7c1b56fd83/raw/troubleshoot_v1beta1_preflight.yaml`
specURL := `https://gist.githubusercontent.com/divolgin/92b512ad4697c7255f383a7c1b56fd83/raw`
resp, err := http.Get(specURL)
if err != nil {
return nil, err
Expand Down
1 change: 0 additions & 1 deletion pkg/apis/troubleshoot/v1beta1/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ package v1beta1
type SupportBundleVersion struct {
ApiVersion string `json:"apiVersion" yaml:"apiVersion"`
Kind string `json:"kind" yaml:"kind"`
LayoutVersion string `json:"layoutVersion" yaml:"layoutVersion"`
}

0 comments on commit 7e541de

Please sign in to comment.