adguardhome-sync/pkg/utils/ptr.go
Marc Brugger da289017a5
Generate types from openapi (#201)
* generate model from openAPI schema
* implement replica status #231
* Sync "Pause service blocking schedule" #234
* Sync "Safe Search Provider" #200
2023-11-13 21:09:08 +01:00

14 lines
185 B
Go

package utils
import "fmt"
func Ptr[I interface{}](i I) *I {
return &i
}
func PtrToString[I interface{}](i *I) string {
if i == nil {
return ""
}
return fmt.Sprintf("%v", i)
}