Skip to content

Commit de45823

Browse files
committed
chore(mcp/types): format types.go
1 parent d0e3734 commit de45823

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

mcp/types.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ package mcp
55
import (
66
"encoding/json"
77
"fmt"
8-
"strconv"
98
"maps"
9+
"strconv"
1010

1111
"github.com/yosida95/uritemplate/v3"
1212
)
@@ -741,22 +741,22 @@ const (
741741
var (
742742
// Map logging level constants to numerical codes as specified in RFC-5424
743743
levelToSeverity = func() map[LoggingLevel]int {
744-
return map[LoggingLevel]int {
745-
LoggingLevelEmergency: 0,
746-
LoggingLevelAlert: 1,
747-
LoggingLevelCritical: 2,
748-
LoggingLevelError: 3,
749-
LoggingLevelWarning: 4,
750-
LoggingLevelNotice: 5,
751-
LoggingLevelInfo: 6,
752-
LoggingLevelDebug: 7,
744+
return map[LoggingLevel]int{
745+
LoggingLevelEmergency: 0,
746+
LoggingLevelAlert: 1,
747+
LoggingLevelCritical: 2,
748+
LoggingLevelError: 3,
749+
LoggingLevelWarning: 4,
750+
LoggingLevelNotice: 5,
751+
LoggingLevelInfo: 6,
752+
LoggingLevelDebug: 7,
753753
}
754754
}()
755755
)
756756

757757
// Allows is a helper function that decides a message could be sent to client or not according to the logging level
758758
func (subscribedLevel LoggingLevel) Allows(currentLevel LoggingLevel) (bool, error) {
759-
if _, ok := levelToSeverity[currentLevel]; !ok {
759+
if _, ok := levelToSeverity[currentLevel]; !ok {
760760
return false, fmt.Errorf("illegal message logging level:%s", currentLevel)
761761
}
762762
return levelToSeverity[subscribedLevel] >= levelToSeverity[currentLevel], nil

0 commit comments

Comments
 (0)