Skip to content

Commit

Permalink
FEAT : exit
Browse files Browse the repository at this point in the history
  • Loading branch information
unshade committed Apr 13, 2024
1 parent 3b74665 commit 841d109
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ func handleConnection(conn net.Conn, rootCmd *cobra.Command) {
args := strings.Split(string(buffer), " ")
commandName := args[0]

if commandName == "exit" {
conn.Close()
return
}

cmdList := rootCmd.Commands()

for _, cmd := range cmdList {
Expand Down

0 comments on commit 841d109

Please sign in to comment.