close
The Wayback Machine - https://web.archive.org/web/20210514125434/https://github.com/apache/trafficcontrol/commit/6c042da119566704ae2c5be87c36e210108200ef
Skip to content
Permalink
Browse files
Fix go vet: Struct field tag issues (#5795)
* Fix struct field tag issues

* Change into correct JSON tag
  • Loading branch information
alebricio committed Apr 28, 2021
1 parent 0fce481 commit 6c042da119566704ae2c5be87c36e210108200ef
@@ -37,7 +37,7 @@ var resultChan chan data.HttpResult
var results []data.HttpResult

type credentials struct {
User string `json: "u"`
User string `json:"u"`
Password string `json:"p"`
}

@@ -42,8 +42,8 @@ type Event struct {
Hostname string `json:"hostname"`
Type string `json:"type"`
Available bool `json:"isAvailable"`
IPv4Available bool `json:"isAvailable"`
IPv6Available bool `json:"isAvailable"`
IPv4Available bool `json:"ipv4Available"`
IPv6Available bool `json:"ipv6Available"`
}

// Events provides safe access for multiple goroutines readers and a single writer to a stored Events slice.
@@ -37,11 +37,11 @@ const (
const CurrentAsyncEndpoint = "/api/4.0/async_status/"

type AsyncStatus struct {
Id int `json:"id, omitempty" db:"id"`
Status string `json:"status, omitempty" db:"status"`
StartTime time.Time `json:"start_time, omitempty" db:"start_time"`
EndTime *time.Time `json:"end_time, omitempty" db:"end_time"`
Message *string `json:"message, omitempty" db:"message"`
Id int `json:"id,omitempty" db:"id"`
Status string `json:"status,omitempty" db:"status"`
StartTime time.Time `json:"start_time,omitempty" db:"start_time"`
EndTime *time.Time `json:"end_time,omitempty" db:"end_time"`
Message *string `json:"message,omitempty" db:"message"`
}

const selectAsyncStatusQuery = `SELECT id, status, message, start_time, end_time from async_status WHERE id = $1`
@@ -48,7 +48,7 @@ type ASNQueryParams struct {

// Autonomous System Numbers per APNIC for identifying a service provider
//
asn string `json:"asn"`
Asn string `json:"asn"`

// Related cachegroup name
//

0 comments on commit 6c042da

Please sign in to comment.