20 lines
283 B
Go
20 lines
283 B
Go
package graph
|
|
|
|
import "time"
|
|
|
|
func timeValue(value *time.Time) time.Time {
|
|
if value == nil {
|
|
return time.Now()
|
|
}
|
|
return *value
|
|
}
|
|
|
|
func stringValue(value *string) string {
|
|
if value == nil {
|
|
return ""
|
|
}
|
|
return *value
|
|
}
|
|
|
|
func stringPtr(value string) *string { return &value }
|