Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

Only keep first letter capitalized for Severity

天舟596a076b5a7f
diff --git a/plugin/advisor/advisor.go b/plugin/advisor/advisor.go
index 4138b32eb4..5adaa9cd84 100644
--- a/plugin/advisor/advisor.go
+++ b/plugin/advisor/advisor.go
@@ -13,18 +13,18 @@ import (
type Severity string
const (
- INFO Severity = "INFO"
- WARN Severity = "WARN"
- ERROR Severity = "ERROR"
+ Info Severity = "INFO"
+ Warn Severity = "WARN"
+ Error Severity = "ERROR"
)
func (e Severity) String() string {
switch e {
- case INFO:
+ case Info:
return "INFO"
- case WARN:
+ case Warn:
return "WARN"
- case ERROR:
+ case Error:
return "ERROR"
}
return "UNKNOWN"
diff --git a/plugin/advisor/fake/fake_advisor.go b/plugin/advisor/fake/fake_advisor.go
index 1d450a39f7..9c0c38038f 100644
--- a/plugin/advisor/fake/fake_advisor.go
+++ b/plugin/advisor/fake/fake_advisor.go
@@ -22,17 +22,17 @@ type Advisor struct {
func (adv *Advisor) Check(ctx advisor.AdvisorContext, statement string) ([]advisor.Advice, error) {
return []advisor.Advice{
{
- Severity: advisor.INFO,
+ Severity: advisor.Info,
Title: "INFO check",
Content: "Fake check returnings INFO result",
},
{
- Severity: advisor.WARN,
+ Severity: advisor.Warn,
Title: "WARN check",
Content: "Fake check returnings WARN result",
},
{
- Severity: advisor.ERROR,
+ Severity: advisor.Error,
Title: "ERROR check",
Content: "Fake check returnings ERROR result",
},