bbgo_origin/pkg/slack/slackstyle/style.go

20 lines
374 B
Go
Raw Permalink Normal View History

2020-07-10 13:34:39 +00:00
package slackstyle
2022-06-20 02:21:42 +00:00
// Green is the green hex color
2020-07-10 13:34:39 +00:00
const Green = "#228B22"
2022-06-20 02:21:42 +00:00
// Red is the red hex color
2020-07-10 13:34:39 +00:00
const Red = "#800000"
2022-06-20 02:21:42 +00:00
// TrendIcon returns the slack emoji of trends
// 1: uptrend
// -1: downtrend
2020-07-10 13:34:39 +00:00
func TrendIcon(trend int) string {
if trend < 0 {
return ":chart_with_downwards_trend:"
} else if trend > 0 {
return ":chart_with_upwards_trend:"
}
return ""
}