Unverified Commit 870ba8c7 authored by Lwxiang's avatar Lwxiang
Browse files

style: fix go vet issues in health, issue #70

parent ea157156
Showing with 12 additions and 12 deletions
+12 -12
......@@ -69,18 +69,18 @@ type Job struct {
// url of the checked point, ip:port
Url string `json:"url"`
// the result of this job.
Status *JobStatus `json:"status, omitempty"`
Status *JobStatus `json:"status,omitempty"`
}
type JobStatus struct {
// slave infos that do this job
SlaveInfo *Slave `json:"slaveInfo, omitempty"`
SlaveInfo *Slave `json:"slaveInfo,omitempty"`
// where the job is success or not.
Success bool `json:"success, omitempty"`
Success bool `json:"success,omitempty"`
// record the check result when failed.
Message string `json:"message, omitempty"`
Message string `json:"message,omitempty"`
// time of the job is done.
FinishedAt int64 `json:"finishedAt, omitempty"`
FinishedAt int64 `json:"finishedAt,omitempty"`
}
// health slave's meta info
......
......@@ -47,7 +47,7 @@ type ClusterStatus struct {
type HealthResult struct {
Status HealthStatus `json:"status"`
Message MsgDetail `json:"message, omitempty"`
Message MsgDetail `json:"message,omitempty"`
}
type MsgDetail []string
......
......@@ -100,7 +100,7 @@ type Job struct {
// url of the checked point, ip:port
Url string `json:"url"`
// the result of this job.
Status *JobStatus `json:"status, omitempty"`
Status *JobStatus `json:"status,omitempty"`
}
func (j *Job) Name() string {
......@@ -135,16 +135,16 @@ func (j *Job) DeepCopy() *Job {
type JobStatus struct {
// slave infos that do this job
SlaveInfo *Slave `json:"slaveInfo, omitempty"`
SlaveInfo *Slave `json:"slaveInfo,omitempty"`
// where the job is success or not.
Success bool `json:"success, omitempty"`
Success bool `json:"success,omitempty"`
// record the check result when failed.
Message string `json:"message, omitempty"`
Message string `json:"message,omitempty"`
// time of the job is done.
FinishedAt int64 `json:"finishedAt, omitempty"`
FinishedAt int64 `json:"finishedAt,omitempty"`
}
type SvrResponse struct {
Error error `json:"error"`
Jobs []*Job `json:"jobs, omitempty"`
Jobs []*Job `json:"jobs,omitempty"`
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment