rename non-camel-case vars, refactor, satisfy linter

This commit is contained in:
2026-08-22 17:47:37 +02:00
parent 9e558e1f3c
commit d64f84c887
13 changed files with 220 additions and 206 deletions

View File

@@ -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
}