MCPcopy Create free account
hub / github.com/rilldata/rill / safeInt64

Function safeInt64

admin/server/projects.go:2411–2416  ·  view source on GitHub ↗
(s *int64)

Source from the content-addressed store, hash-verified

2409}
2410
2411func safeInt64(s *int64) int64 {
2412 if s == nil {
2413 return 0
2414 }
2415 return *s
2416}
2417
2418func valOrDefault[T any](ptr *T, def T) T {
2419 if ptr != nil {

Callers 1

projToDTOMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected