gitee.com/openeuler/go-gitee@v0.0.0-20220530104019-3af895bc380c/gitee/hook_branchhook_accessors.go (about) 1 package gitee 2 3 func (b *BranchHook) GetLabel() string { 4 if b == nil { 5 return "" 6 } 7 8 return b.Label 9 } 10 11 func (b *BranchHook) GetRef() string { 12 if b == nil { 13 return "" 14 } 15 16 return b.Ref 17 } 18 19 func (b *BranchHook) GetSha() string { 20 if b == nil { 21 return "" 22 } 23 24 return b.Sha 25 } 26 27 func (b *BranchHook) GetUser() *UserHook { 28 if b == nil { 29 return nil 30 } 31 32 return b.User 33 } 34 35 func (b *BranchHook) GetRepo() *ProjectHook { 36 if b == nil { 37 return nil 38 } 39 40 return b.Repo 41 }