mirror of
https://github.com/Luzifer/discord-community.git
synced 2024-12-20 10:21:22 +00:00
Add support for Duration, add empty values
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
f59d4dc5b8
commit
465265da95
1 changed files with 10 additions and 2 deletions
|
@ -1,4 +1,12 @@
|
|||
package main
|
||||
|
||||
import "time"
|
||||
|
||||
var (
|
||||
ptrInt64Zero = ptrInt64(0)
|
||||
ptrStringEmpty = ptrString("")
|
||||
)
|
||||
|
||||
func ptrDuration(v time.Duration) *time.Duration { return &v }
|
||||
func ptrInt64(v int64) *int64 { return &v }
|
||||
func ptrString(v string) *string { return &v }
|
||||
|
|
Loading…
Reference in a new issue