Skip to content

Latest commit

 

History

History
30 lines (23 loc) · 562 Bytes

README.md

File metadata and controls

30 lines (23 loc) · 562 Bytes

cveapi-go

License

Golang client for cveapi API

Usage

package main

import (
    "fmt"
    "github.com/viiftw/cveapi-go"
)

func main() {
  client := cveapi.NewClient()

  // get cve data
  cveID := "CVE-2019-9956"
  cveData, err := client.GetCVEData(cveID)
  if err != nil {
    fmt.Println(err)
  } else {
    fmt.Println(cveData.Cve.CVEDataMeta.ID, cveData.Cve.CVEDataMeta.Assigner)
  }
  // => CVE-2019-9956 [email protected]
}