From bc3078299df726cc7abe49e67ab7915df4f9e240 Mon Sep 17 00:00:00 2001 From: oslowalk Date: Sun, 9 Apr 2023 17:08:28 +0200 Subject: [PATCH] Apply review suggestions --- github/github-accessors.go | 8 ++++---- github/github-accessors_test.go | 10 +++++----- github/repos_pages.go | 6 +++--- github/repos_pages_test.go | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/github/github-accessors.go b/github/github-accessors.go index 0f1b17656a9..8e7f82e9896 100644 --- a/github/github-accessors.go +++ b/github/github-accessors.go @@ -12070,12 +12070,12 @@ func (p *PagesDomain) GetEnforcesHTTPS() bool { return *p.EnforcesHTTPS } -// GetHasCNAMERecordPresent returns the HasCNAMERecordPresent field if it's non-nil, zero value otherwise. -func (p *PagesDomain) GetHasCNAMERecordPresent() bool { - if p == nil || p.HasCNAMERecordPresent == nil { +// GetHasCNAMERecord returns the HasCNAMERecord field if it's non-nil, zero value otherwise. +func (p *PagesDomain) GetHasCNAMERecord() bool { + if p == nil || p.HasCNAMERecord == nil { return false } - return *p.HasCNAMERecordPresent + return *p.HasCNAMERecord } // GetHasMXRecordsPresent returns the HasMXRecordsPresent field if it's non-nil, zero value otherwise. diff --git a/github/github-accessors_test.go b/github/github-accessors_test.go index d612dd27713..ccefd369196 100644 --- a/github/github-accessors_test.go +++ b/github/github-accessors_test.go @@ -14158,14 +14158,14 @@ func TestPagesDomain_GetEnforcesHTTPS(tt *testing.T) { p.GetEnforcesHTTPS() } -func TestPagesDomain_GetHasCNAMERecordPresent(tt *testing.T) { +func TestPagesDomain_GetHasCNAMERecord(tt *testing.T) { var zeroValue bool - p := &PagesDomain{HasCNAMERecordPresent: &zeroValue} - p.GetHasCNAMERecordPresent() + p := &PagesDomain{HasCNAMERecord: &zeroValue} + p.GetHasCNAMERecord() p = &PagesDomain{} - p.GetHasCNAMERecordPresent() + p.GetHasCNAMERecord() p = nil - p.GetHasCNAMERecordPresent() + p.GetHasCNAMERecord() } func TestPagesDomain_GetHasMXRecordsPresent(tt *testing.T) { diff --git a/github/repos_pages.go b/github/repos_pages.go index 70a546fdaf0..83075dbdd23 100644 --- a/github/repos_pages.go +++ b/github/repos_pages.go @@ -47,7 +47,7 @@ type PagesBuild struct { UpdatedAt *Timestamp `json:"updated_at,omitempty"` } -// PagesDomain represents a domain associated with a Github Pages site. +// PagesDomain represents a domain associated with a GitHub Pages site. type PagesDomain struct { Host *string `json:"host,omitempty"` URI *string `json:"uri,omitempty"` @@ -58,7 +58,7 @@ type PagesDomain struct { IsFastlyIP *bool `json:"is_fastly_ip,omitempty"` IsOldIPAddress *bool `json:"is_old_ip_address,omitempty"` IsARecord *bool `json:"is_a_record,omitempty"` - HasCNAMERecordPresent *bool `json:"has_cname_record,omitempty"` + HasCNAMERecord *bool `json:"has_cname_record,omitempty"` HasMXRecordsPresent *bool `json:"has_mx_records_present,omitempty"` IsValidDomain *bool `json:"is_valid_domain,omitempty"` IsApexDomain *bool `json:"is_apex_domain,omitempty"` @@ -79,7 +79,7 @@ type PagesDomain struct { CAAError *string `json:"caa_error,omitempty"` } -// PagesHealthCheckResponse represents the response given for the health check of a Github Pages site. +// PagesHealthCheckResponse represents the response given for the health check of a GitHub Pages site. type PagesHealthCheckResponse struct { Domain *PagesDomain `json:"domain,omitempty"` AltDomain *PagesDomain `json:"alt_domain,omitempty"` diff --git a/github/repos_pages_test.go b/github/repos_pages_test.go index aab19308854..21ffb18127f 100644 --- a/github/repos_pages_test.go +++ b/github/repos_pages_test.go @@ -621,7 +621,7 @@ func TestPagesHealthCheckResponse_Marshal(t *testing.T) { IsFastlyIP: Bool(false), IsOldIPAddress: Bool(false), IsARecord: Bool(true), - HasCNAMERecordPresent: Bool(false), + HasCNAMERecord: Bool(false), HasMXRecordsPresent: Bool(false), IsValidDomain: Bool(true), IsApexDomain: Bool(true),