// Package ws holds the "ws" command: "ws serve" runs the plain TCP server for // websocket hub clients, and "ws dial" tests the HTTP server's /ws endpoint. package ws import ( "log/slog" "github.com/spf13/cobra" "git.avsdev.uk/Go/job-search/internal/cli" ) // NewCommand returns the "ws" command, for the WebSocket servers. func NewCommand(opts *cli.Options) *cobra.Command { cmd := &cobra.Command{ Use: "ws", Short: "WebSocket servers and tools", PersistentPreRun: func(cmd *cobra.Command, args []string) { slog.Debug("command persistent pre-run", "command", "ws") }, PersistentPostRun: func(cmd *cobra.Command, args []string) { slog.Debug("command persistent post-run", "command", "ws") }, } cmd.AddCommand(commandServe(opts)) cmd.AddCommand(commandDial(opts)) return cmd }