24 lines
278 B
Go
24 lines
278 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"os"
|
||
|
|
||
|
"tuxpa.in/t/wm/src/sock"
|
||
|
)
|
||
|
|
||
|
func main() {
|
||
|
s, err := sock.Default()
|
||
|
errExit(err)
|
||
|
resp, err := s.Send(os.Args[1:]...)
|
||
|
errExit(err)
|
||
|
fmt.Print(resp)
|
||
|
}
|
||
|
|
||
|
func errExit(err error) {
|
||
|
if err != nil {
|
||
|
fmt.Printf(err.Error())
|
||
|
os.Exit(1)
|
||
|
}
|
||
|
}
|