mirror of
https://github.com/onyx-and-iris/gobs-cli.git
synced 2026-04-18 07:03:37 +00:00
first commit
This commit is contained in:
24
version.go
Normal file
24
version.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// VersionCmd handles the version command.
|
||||
type VersionCmd struct{} // size = 0x0
|
||||
|
||||
// Run executes the command to get the OBS client version.
|
||||
func (cmd *VersionCmd) 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
|
||||
}
|
||||
Reference in New Issue
Block a user