mirror of
https://github.com/onyx-and-iris/gobs-cli.git
synced 2025-06-30 15:30:31 +01:00
- print help on error - print in compact mode move version + VersionFlag into main store version in kong.Vars add 0.13.3 to CHANGELOG
25 lines
468 B
Go
25 lines
468 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
// ObsVersionCmd handles the version command.
|
|
type ObsVersionCmd struct{} // size = 0x0
|
|
|
|
// Run executes the command to get the OBS client version.
|
|
func (cmd *ObsVersionCmd) Run(ctx *context) error {
|
|
version, err := ctx.Client.General.GetVersion()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
fmt.Fprintf(
|
|
ctx.Out,
|
|
"OBS Client Version: %s with Websocket Version: %s\n",
|
|
version.ObsVersion,
|
|
version.ObsWebSocketVersion,
|
|
)
|
|
|
|
return nil
|
|
}
|