mirror of
https://codeberg.org/scip/swayipc.git
synced 2026-08-23 22:34:20 +02:00
renovate the code, update to go 1.26 and satisfy linter (#3)
This commit is contained in:
@@ -5,7 +5,7 @@ import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// A version struct holding the sway wm version
|
||||
// Version stores the sway wm version
|
||||
type Version struct {
|
||||
HumanReadable string `json:"human_readable"`
|
||||
Major int `json:"major"`
|
||||
@@ -13,9 +13,9 @@ type Version struct {
|
||||
Patch int `json:"patch"`
|
||||
}
|
||||
|
||||
// Get the sway software version
|
||||
// GetVersion returns the sway software version
|
||||
func (ipc *SwayIPC) GetVersion() (*Version, error) {
|
||||
payload, err := ipc.get(GET_VERSION)
|
||||
payload, err := ipc.get(MsgGetVersion)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user