Skip to content

Commit 13398c3

Browse files
committed
Fix linting errors
Signed-off-by: Radoslav Dimitrov <[email protected]>
1 parent a8fc4f5 commit 13398c3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

cmd/thv/app/list.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func listCmdFunc(cmd *cobra.Command, _ []string) error {
7171
// Output based on format
7272
switch listFormat {
7373
//nolint:goconst
74-
case "json":
74+
case FormatJSON:
7575
return printJSONOutput(toolHiveContainers)
7676
case "mcpservers":
7777
return printMCPServersOutput(toolHiveContainers)

cmd/thv/app/registry.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ func init() {
4848
registryCmd.AddCommand(registryInfoCmd)
4949

5050
// Add flags for list and info commands
51-
registryListCmd.Flags().StringVar(&registryFormat, "format", "text", "Output format (json or text)")
52-
registryInfoCmd.Flags().StringVar(&registryFormat, "format", "text", "Output format (json or text)")
51+
registryListCmd.Flags().StringVar(&registryFormat, "format", FormatText, "Output format (json or text)")
52+
registryInfoCmd.Flags().StringVar(&registryFormat, "format", FormatText, "Output format (json or text)")
5353
}
5454

5555
func registryListCmdFunc(_ *cobra.Command, _ []string) error {
@@ -66,7 +66,7 @@ func registryListCmdFunc(_ *cobra.Command, _ []string) error {
6666

6767
// Output based on format
6868
switch registryFormat {
69-
case "json":
69+
case FormatJSON:
7070
return printJSONServers(servers)
7171
default:
7272
printTextServers(servers)
@@ -84,7 +84,7 @@ func registryInfoCmdFunc(_ *cobra.Command, args []string) error {
8484

8585
// Output based on format
8686
switch registryFormat {
87-
case "json":
87+
case FormatJSON:
8888
return printJSONServer(server)
8989
default:
9090
printTextServerInfo(serverName, server)

0 commit comments

Comments
 (0)