fix golint and go vet issue

This commit is contained in:
Tan Jiang 2018-03-26 22:10:01 +08:00
parent 582deea9e7
commit c859616e25
3 changed files with 3 additions and 2 deletions

View File

@ -84,7 +84,7 @@ func UpdateScanJobStatus(id int64, status string) error {
return err return err
} }
// SetScanJobDigest set UUID to the record so it associates with the job in job service. // SetScanJobUUID set UUID to the record so it associates with the job in job service.
func SetScanJobUUID(id int64, uuid string) error { func SetScanJobUUID(id int64, uuid string) error {
o := GetOrmer() o := GetOrmer()
sj := models.ScanJob{ sj := models.ScanJob{

View File

@ -5,7 +5,7 @@ type ScanJobParms struct {
JobID int64 `json:"job_int_id"` JobID int64 `json:"job_int_id"`
Repository string `json:"repository"` Repository string `json:"repository"`
Tag string `json:"tag"` Tag string `json:"tag"`
Digest string `json:digest"` Digest string `json:"digest"`
Secret string `json:"job_service_secret"` Secret string `json:"job_service_secret"`
RegistryURL string `json:"registry_url"` RegistryURL string `json:"registry_url"`
ClairEndpoint string `json:"clair_endpoint"` ClairEndpoint string `json:"clair_endpoint"`

View File

@ -85,6 +85,7 @@ func scanRepos(repos []*models.RepoRecord) {
} }
} }
// GetJobServiceClient returns the job service client instance.
func GetJobServiceClient() job.Client { func GetJobServiceClient() job.Client {
cl.Lock() cl.Lock()
defer cl.Unlock() defer cl.Unlock()