From 86553ad5a1ed46416d22f13be464838e38ffb872 Mon Sep 17 00:00:00 2001 From: Finn Date: Mon, 8 Oct 2018 17:51:56 -0700 Subject: [PATCH] Rename Send() to SendRequest() Eventually Send() will probably be a wrapper for messages with type send --- signald-cli/cmd/send.go | 2 +- signald/signald.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/signald-cli/cmd/send.go b/signald-cli/cmd/send.go index 8ccb7d7..6ae6f49 100644 --- a/signald-cli/cmd/send.go +++ b/signald-cli/cmd/send.go @@ -56,7 +56,7 @@ var sendCmd = &cobra.Command{ if attachment != "" { request.AttachmentFilenames = []string{attachment} } - s.Send(request) + s.SendRequest(request) }, } diff --git a/signald/signald.go b/signald/signald.go index 705665e..994458a 100644 --- a/signald/signald.go +++ b/signald/signald.go @@ -43,8 +43,8 @@ func (s *Signald) Listen(c chan interface{}) { } } -// Send sends a request to signald. -func (s *Signald) Send(request Request) { +// SendRequest sends a request to signald. Mostly used interally. +func (s *Signald) SendRequest(request Request) { b, err := json.Marshal(request) crash(err) log.Print("Sending ", string(b))