From c5169f271067ea6daf72d05ff822332abdfaa315 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bokun=20Wang=20=E7=8E=8B=E5=8D=9A=E5=9D=A4?= Date: Sat, 10 Oct 2020 12:00:41 +0800 Subject: [PATCH] add monitor auto lower --- tools/autolevel.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tools/autolevel.go diff --git a/tools/autolevel.go b/tools/autolevel.go new file mode 100644 index 0000000..c5b85b6 --- /dev/null +++ b/tools/autolevel.go @@ -0,0 +1,18 @@ +package tools + +type Autolower struct{} + +func (Autolower)MonitorLevelP(level string)(l string) { + switch level { + case "P0": + return "p1" + case "P1": + return "p2" + case "P2": + return "p3" + case "P3": + return "p4" + default: + return level + } +} \ No newline at end of file