From 07f5168a6a292f96546570f014f24c61427c3c54 Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 12 Mar 2020 11:35:36 -0400 Subject: [PATCH] subscriptionChannels should not be exported --- chat.go | 6 +++--- types.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/chat.go b/chat.go index b5b9edf..09f5309 100644 --- a/chat.go +++ b/chat.go @@ -63,7 +63,7 @@ func createFiltersString(channels []chat1.ChatChannel) string { } // Run `keybase chat api-listen` to get new messages coming into keybase and send them into the channel -func getNewMessages(k *Keybase, subs *SubscriptionChannels, execOptions []string) { +func getNewMessages(k *Keybase, subs *subscriptionChannels, execOptions []string) { execString := []string{"chat", "api-listen"} if len(execOptions) > 0 { execString = append(execString, execOptions...) @@ -73,7 +73,7 @@ func getNewMessages(k *Keybase, subs *SubscriptionChannels, execOptions []string stdOut, _ := execCmd.StdoutPipe() execCmd.Start() scanner := bufio.NewScanner(stdOut) - go func(scanner *bufio.Scanner, subs *SubscriptionChannels) { + go func(scanner *bufio.Scanner, subs *subscriptionChannels) { for { scanner.Scan() var subType subscriptionType @@ -155,7 +155,7 @@ func (k *Keybase) Run(handlers Handlers, options *RunOptions) { walletCh := make(chan stellar1.PaymentDetailsLocal, channelCapacity) errorCh := make(chan error, channelCapacity) - subs := &SubscriptionChannels{ + subs := &subscriptionChannels{ chat: chatCh, conversation: convCh, wallet: walletCh, diff --git a/types.go b/types.go index ac7c660..6a031a3 100644 --- a/types.go +++ b/types.go @@ -36,8 +36,8 @@ type Handlers struct { ErrorHandler *func(error) } -// SubscriptionChannels are passed to GetNewMessages to return data through channels -type SubscriptionChannels struct { +// subscriptionChannels are passed to getNewMessages to return data through channels +type subscriptionChannels struct { chat chan chat1.MsgSummary conversation chan chat1.ConvSummary wallet chan stellar1.PaymentDetailsLocal