GoDoxy/internal/notif/color.go
Yuzerion 78900772bb
Feat/ntfy (#57)
* implement ntfy notification

* fix notification fields order

* fix schema for ntfy

---------

Co-authored-by: yusing <yusing@6uo.me>
2025-02-01 13:07:44 +08:00

23 lines
344 B
Go

package notif
import "fmt"
type Color uint
const (
ColorError Color = 0xff0000
ColorSuccess Color = 0x00ff00
ColorInfo Color = 0x0000ff
)
func (c Color) HexString() string {
return fmt.Sprintf("#%x", c)
}
func (c Color) DecString() string {
return fmt.Sprintf("%d", c)
}
func (c Color) String() string {
return c.HexString()
}