Add type PushId.

This commit is contained in:
Владислав Весельский 2025-01-27 12:53:40 +03:00
parent 4b3e0e53e0
commit 2b7a4dcac0
3 changed files with 18 additions and 0 deletions

3
go.mod Normal file
View File

@ -0,0 +1,3 @@
module git.bit5.ru/backend/push_common
go 1.19

View File

@ -1,5 +1,13 @@
package push_common package push_common
type PushId uint32
func (id PushId) String() string {
return uint32ToString(uint32(id))
}
//-----------------------------------------------------------------------------
type TextVariant struct { type TextVariant struct {
Lang int `json:"lang"` Lang int `json:"lang"`
Title string `json:"title"` Title string `json:"title"`

7
util.go Normal file
View File

@ -0,0 +1,7 @@
package push_common
import "strconv"
func uint32ToString(n uint32) string {
return strconv.FormatUint(uint64(n), 10)
}