MCPcopy Index your code
hub / github.com/koding/kite / handleNotifyDarwin

Function handleNotifyDarwin

handlers.go:148–153  ·  view source on GitHub ↗

handleNotifyDarwin displays a desktop notification on OS X.

(r *Request)

Source from the content-addressed store, hash-verified

146
147// handleNotifyDarwin displays a desktop notification on OS X.
148func handleNotifyDarwin(r *Request) (interface{}, error) {
149 args := r.Args.MustSliceOfLength(3)
150 cmd := exec.Command("osascript", "-e", fmt.Sprintf("display notification \"%s\" with title \"%s\" subtitle \"%s\"",
151 args[1].MustString(), args[2].MustString(), args[0].MustString()))
152 return nil, cmd.Start()
153}
154
155// handleTunnel opens two websockets, one to proxy kite and one to itself,
156// then it copies the message between them.

Callers

nothing calls this directly

Calls 3

MustSliceOfLengthMethod · 0.80
MustStringMethod · 0.80
StartMethod · 0.80

Tested by

no test coverage detected