mirror of
https://codeberg.org/scip/sway-descratch.git
synced 2025-12-17 04:30:58 +01:00
fix linting errors
This commit is contained in:
8
main.go
8
main.go
@@ -36,7 +36,11 @@ func main() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
defer ipc.Close()
|
defer func() {
|
||||||
|
if err := ipc.Close(); err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
// first, retrieve the whole sway root node
|
// first, retrieve the whole sway root node
|
||||||
root, err := ipc.GetTree()
|
root, err := ipc.GetTree()
|
||||||
@@ -51,7 +55,7 @@ func main() {
|
|||||||
// called with an arg, consider it to be a container id
|
// called with an arg, consider it to be a container id
|
||||||
id, err := strconv.Atoi(os.Args[1])
|
id, err := strconv.Atoi(os.Args[1])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("failed to convert arg %s to integer: %w", os.Args[1], err)
|
log.Fatalf("failed to convert arg %s to integer: %s", os.Args[1], err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// switch to it
|
// switch to it
|
||||||
|
|||||||
Reference in New Issue
Block a user