wm/cmd/bspc/main.go

29 lines
354 B
Go
Raw Permalink Normal View History

2022-12-26 02:18:39 +00:00
package main
import (
"fmt"
"os"
"tuxpa.in/t/wm/src/sock"
)
func main() {
2022-12-26 05:06:40 +00:00
s, err := sock.Client("")
2022-12-26 02:18:39 +00:00
errExit(err)
2023-06-11 10:24:15 +00:00
o := os.Args[1:]
if len(o) == 0 {
fmt.Println("no arguments given.")
return
}
resp, err := s.Send(o...)
2022-12-26 02:18:39 +00:00
errExit(err)
fmt.Print(resp)
}
func errExit(err error) {
if err != nil {
fmt.Printf(err.Error())
os.Exit(1)
}
}