From 24023c479c625331985bf324cbf92c570ea37e8e Mon Sep 17 00:00:00 2001 From: Tobias Gesellchen Date: Thu, 7 Jul 2022 17:04:12 +0200 Subject: [PATCH] Let go generate do its work --- github/github-accessors.go | 10 +++++----- github/github-accessors_test.go | 4 +--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/github/github-accessors.go b/github/github-accessors.go index 5a2857ad73..2efe1d43e3 100644 --- a/github/github-accessors.go +++ b/github/github-accessors.go @@ -10790,12 +10790,12 @@ func (p *PagesUpdate) GetPublic() bool { return *p.Public } -// GetSource returns the Source field if it's non-nil, zero value otherwise. -func (p *PagesUpdate) GetSource() PagesSource { - if p == nil || p.Source == nil { - return PagesSource{} +// GetSource returns the Source field. +func (p *PagesUpdate) GetSource() *PagesSource { + if p == nil { + return nil } - return *p.Source + return p.Source } // GetHook returns the Hook field. diff --git a/github/github-accessors_test.go b/github/github-accessors_test.go index 584475091a..ac370a0f1d 100644 --- a/github/github-accessors_test.go +++ b/github/github-accessors_test.go @@ -12643,9 +12643,7 @@ func TestPagesUpdate_GetPublic(tt *testing.T) { } func TestPagesUpdate_GetSource(tt *testing.T) { - p := &PagesUpdate{Source: &PagesSource{}} - p.GetSource() - p = &PagesUpdate{} + p := &PagesUpdate{} p.GetSource() p = nil p.GetSource()