mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-12 10:55:20 +02:00
3744787348
* refactor github package and use builder pattern for client * switch to github package * some renamings * fix panic on uninitialized provider * fix according to review comments --------- Co-authored-by: Gulom Alimov <gulomjon.alimov@sap.com> Co-authored-by: Jordi van Liempt <35920075+jliempt@users.noreply.github.com>
11 lines
127 B
Go
11 lines
127 B
Go
package piperutils
|
|
|
|
func SafeDereference[T any](p *T) T {
|
|
if p == nil {
|
|
var zeroValue T
|
|
return zeroValue
|
|
}
|
|
|
|
return *p
|
|
}
|