@@ -61,7 +61,7 @@ func runListTools(_ *cobra.Command, _ []string) error {
6161 if err != nil {
6262 return err
6363 }
64- defer client .Close ()
64+ defer func () { _ = client .Close () } ()
6565
6666 tools , err := client .ListTools (ctx )
6767 if err != nil {
@@ -87,15 +87,15 @@ func runListTools(_ *cobra.Command, _ []string) error {
8787 }
8888
8989 w := tabwriter .NewWriter (os .Stdout , 0 , 4 , 2 , ' ' , 0 )
90- fmt .Fprintf (w , "NAME\t DESCRIPTION\n " )
90+ _ , _ = fmt .Fprintf (w , "NAME\t DESCRIPTION\n " )
9191 for _ , t := range tools {
9292 desc := t .Description
9393 if len (desc ) > 80 {
9494 desc = desc [:77 ] + "..."
9595 }
96- fmt .Fprintf (w , "%s\t %s\n " , t .Name , desc )
96+ _ , _ = fmt .Fprintf (w , "%s\t %s\n " , t .Name , desc )
9797 }
98- w .Flush ()
98+ _ = w .Flush ()
9999 fmt .Printf ("\n %d tools registered\n " , len (tools ))
100100 return nil
101101}
@@ -106,7 +106,7 @@ func runListPrompts(_ *cobra.Command, _ []string) error {
106106 if err != nil {
107107 return err
108108 }
109- defer client .Close ()
109+ defer func () { _ = client .Close () } ()
110110
111111 prompts , err := client .ListPrompts (ctx )
112112 if err != nil {
@@ -132,15 +132,15 @@ func runListPrompts(_ *cobra.Command, _ []string) error {
132132 }
133133
134134 w := tabwriter .NewWriter (os .Stdout , 0 , 4 , 2 , ' ' , 0 )
135- fmt .Fprintf (w , "NAME\t DESCRIPTION\n " )
135+ _ , _ = fmt .Fprintf (w , "NAME\t DESCRIPTION\n " )
136136 for _ , p := range prompts {
137137 desc := p .Description
138138 if len (desc ) > 80 {
139139 desc = desc [:77 ] + "..."
140140 }
141- fmt .Fprintf (w , "%s\t %s\n " , p .Name , desc )
141+ _ , _ = fmt .Fprintf (w , "%s\t %s\n " , p .Name , desc )
142142 }
143- w .Flush ()
143+ _ = w .Flush ()
144144 fmt .Printf ("\n %d prompts registered\n " , len (prompts ))
145145 return nil
146146}
@@ -151,7 +151,7 @@ func runListResources(_ *cobra.Command, _ []string) error {
151151 if err != nil {
152152 return err
153153 }
154- defer client .Close ()
154+ defer func () { _ = client .Close () } ()
155155
156156 resources , err := client .ListResources (ctx )
157157 if err != nil {
@@ -178,15 +178,15 @@ func runListResources(_ *cobra.Command, _ []string) error {
178178 }
179179
180180 w := tabwriter .NewWriter (os .Stdout , 0 , 4 , 2 , ' ' , 0 )
181- fmt .Fprintf (w , "NAME\t URI\t DESCRIPTION\n " )
181+ _ , _ = fmt .Fprintf (w , "NAME\t URI\t DESCRIPTION\n " )
182182 for _ , r := range resources {
183183 desc := r .Description
184184 if len (desc ) > 60 {
185185 desc = desc [:57 ] + "..."
186186 }
187- fmt .Fprintf (w , "%s\t %s\t %s\n " , r .Name , r .URI , desc )
187+ _ , _ = fmt .Fprintf (w , "%s\t %s\t %s\n " , r .Name , r .URI , desc )
188188 }
189- w .Flush ()
189+ _ = w .Flush ()
190190 fmt .Printf ("\n %d resources registered\n " , len (resources ))
191191 return nil
192192}
0 commit comments