1
0
mirror of https://github.com/securego/gosec.git synced 2025-11-27 22:28:20 +02:00

Fix lint and fail on error in the ci build

This commit is contained in:
Matthieu MOREL
2021-05-31 10:44:12 +02:00
committed by GitHub
parent dbb9811e62
commit 1256f16f33
51 changed files with 218 additions and 203 deletions

View File

@@ -12,17 +12,17 @@ type Weakness struct {
Description string
}
//SprintURL format the CWE URL
// SprintURL format the CWE URL
func (w *Weakness) SprintURL() string {
return fmt.Sprintf("https://cwe.mitre.org/data/definitions/%s.html", w.ID)
}
//SprintID format the CWE ID
// SprintID format the CWE ID
func (w *Weakness) SprintID() string {
return fmt.Sprintf("%s-%s", Acronym, w.ID)
}
//MarshalJSON print only id and URL
// MarshalJSON print only id and URL
func (w *Weakness) MarshalJSON() ([]byte, error) {
return json.Marshal(&struct {
ID string `json:"id"`
@@ -33,12 +33,12 @@ func (w *Weakness) MarshalJSON() ([]byte, error) {
})
}
//InformationURI link to the published CWE PDF
// InformationURI link to the published CWE PDF
func InformationURI() string {
return fmt.Sprintf("https://cwe.mitre.org/data/published/cwe_v%s.pdf/", Version)
}
//DownloadURI link to the zipped XML of the CWE list
// DownloadURI link to the zipped XML of the CWE list
func DownloadURI() string {
return fmt.Sprintf("https://cwe.mitre.org/data/xml/cwec_v%s.xml.zip", Version)
}