diff --git a/cmd/clairctl/README.md b/cmd/clairctl/README.md index ade76769..4cca58c4 100644 --- a/cmd/clairctl/README.md +++ b/cmd/clairctl/README.md @@ -1,5 +1,3 @@ - - # clairctl > Tracking container vulnerabilities with Clair Control @@ -54,10 +52,6 @@ clair: format: html ``` -# Remarks - -1. Analyzing Official Docker image is disallowed. You cannot pull layers from image you don't own. - # Contribution and Test Go to /contrib folder diff --git a/cmd/clairctl/clair/clair_test.go b/cmd/clairctl/clair/clair_test.go index 485f6f71..9d57bf03 100644 --- a/cmd/clairctl/clair/clair_test.go +++ b/cmd/clairctl/clair/clair_test.go @@ -12,7 +12,6 @@ import ( func getSampleAnalysis() []byte { file, err := ioutil.ReadFile("./samples/clair_report.json") - if err != nil { logrus.Errorf("File error: %v\n", err) } @@ -47,7 +46,6 @@ func TestIsNotHealthy(t *testing.T) { func TestRelativeCount(t *testing.T) { var analysis ImageAnalysis err := json.Unmarshal([]byte(getSampleAnalysis()), &analysis) - if err != nil { t.Errorf("Failing with error: %v", err) } diff --git a/cmd/clairctl/clair/push.go b/cmd/clairctl/clair/push.go index 878dca57..f001e821 100644 --- a/cmd/clairctl/clair/push.go +++ b/cmd/clairctl/clair/push.go @@ -19,7 +19,6 @@ import ( // ErrUnanalizedLayer is returned when the layer was not correctly analyzed var ErrUnanalizedLayer = errors.New("layer cannot be analyzed") -//Push send a layer to Clair for analysis var registryMapping map[string]string //Push image to Clair for analysis diff --git a/cmd/clairctl/clair/versions.go b/cmd/clairctl/clair/versions.go index 51b7a540..65eeed37 100644 --- a/cmd/clairctl/clair/versions.go +++ b/cmd/clairctl/clair/versions.go @@ -10,10 +10,10 @@ func Versions() (interface{}, error) { Config() response, err := http.Get(uri + "/versions") defer response.Body.Close() - if err != nil { return nil, fmt.Errorf("requesting Clair version: %v", err) } + var versionBody interface{} err = json.NewDecoder(response.Body).Decode(&versionBody) if err != nil {