Commit de87ee1b authored by 李科's avatar 李科

style: format project

parent 7b70817d
......@@ -9,7 +9,9 @@ var CHARS = []string{"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l",
"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z",
"1", "2", "3", "4", "5", "6", "7", "8", "9", "0"}
/*RandAllString 生成随机字符串([a~zA~Z0~9])
/*
RandAllString 生成随机字符串([a~zA~Z0~9])
lenNum 长度
*/
func RandAllString(lenNum int) string {
......@@ -22,7 +24,9 @@ func RandAllString(lenNum int) string {
return str.String()
}
/*RandNumString 生成随机数字字符串([0~9])
/*
RandNumString 生成随机数字字符串([0~9])
lenNum 长度
*/
func RandNumString(lenNum int) string {
......@@ -34,7 +38,9 @@ func RandNumString(lenNum int) string {
return str.String()
}
/*RandString 生成随机字符串(a~zA~Z])
/*
RandString 生成随机字符串(a~zA~Z])
lenNum 长度
*/
func RandString(lenNum int) string {
......
......@@ -74,7 +74,7 @@ func (p *PrometheusRuleSvc) Create(data response.AlertRulesItem) (err error) {
case 1:
expr = fmt.Sprintf("%s <= %s", cast.ToString(v.ThresholdsMin), data.Expr)
case 2:
expr = fmt.Sprintf("%s <=%s", data.Expr, cast.ToString(v.ThresholdsMax))
expr = fmt.Sprintf("%s <= %s", data.Expr, cast.ToString(v.ThresholdsMax))
case 3:
expr = fmt.Sprintf("%s <= %s <=%s", cast.ToString(v.ThresholdsMin), data.Expr, cast.ToString(v.ThresholdsMax))
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment