mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-25 10:18:59 +02:00
[BREAKING] changed notification config format, support multiple notification providers, support webhook and markdown style notification
This commit is contained in:
23
internal/notif/color.go
Normal file
23
internal/notif/color.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package notif
|
||||
|
||||
import "fmt"
|
||||
|
||||
type Color uint
|
||||
|
||||
const (
|
||||
Red Color = 0xff0000
|
||||
Green Color = 0x00ff00
|
||||
Blue 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()
|
||||
}
|
||||
Reference in New Issue
Block a user