Private
Public Access
1
0

prompt: adds 'version' command

This commit is contained in:
2023-08-10 00:42:49 -07:00
parent 56ad3a49ea
commit e9a9d1c064

View File

@@ -176,6 +176,8 @@ func (p *Prompt) StartInteractive() error {
} }
p.receiveMessage(args[1], body) p.receiveMessage(args[1], body)
case line == "version": // Version
fmt.Printf("Server version: %s\n", p.server.Version())
case line == "help": // Help case line == "help": // Help
fmt.Println("Usage: <command> [args]") fmt.Println("Usage: <command> [args]")
fmt.Println("Where <guid> is specified, '*' can be provided as a wildcard.") fmt.Println("Where <guid> is specified, '*' can be provided as a wildcard.")
@@ -185,6 +187,7 @@ func (p *Prompt) StartInteractive() error {
fmt.Println("\tls <guid> list messages for conversation") fmt.Println("\tls <guid> list messages for conversation")
fmt.Println("\tmark [-r] <guid> mark conversation as unread/[r]ead") fmt.Println("\tmark [-r] <guid> mark conversation as unread/[r]ead")
fmt.Println("\trecv <guid> <msg> receive a message") fmt.Println("\trecv <guid> <msg> receive a message")
fmt.Println("\tversion print server version")
fmt.Println("\thelp show this help") fmt.Println("\thelp show this help")
fmt.Println("\texit exits the program") fmt.Println("\texit exits the program")