@@ -5,8 +5,8 @@ package mcp
55import  (
66	"encoding/json" 
77	"fmt" 
8- 	"strconv" 
98	"maps" 
9+ 	"strconv" 
1010
1111	"github.com/yosida95/uritemplate/v3" 
1212)
@@ -741,22 +741,22 @@ const (
741741var  (
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 
758758func  (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