This repository was archived by the owner on Nov 26, 2018. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ type MockSocket struct {
2626 Receiver chan string
2727}
2828
29- func (sock MockSocket ) Write (data []byte ) (int , error ) {
29+ func (sock * MockSocket ) Write (data []byte ) (int , error ) {
3030 glog .V (3 ).Infoln ("[Debug]: Starting MockSocket.Write of:" , string (data ))
3131 if sock .Counter != nil {
3232 sock .Counter <- true
@@ -38,14 +38,14 @@ func (sock MockSocket) Write(data []byte) (int, error) {
3838 return len (data ), nil
3939}
4040
41- func (sock MockSocket ) Read (into []byte ) (int , error ) {
41+ func (sock * MockSocket ) Read (into []byte ) (int , error ) {
4242 sock .RLock ()
4343 defer sock .RUnlock ()
4444 time .Sleep (time .Second ) // Prevent busy loop
4545 return 0 , nil
4646}
4747
48- func (sock MockSocket ) Close () error {
48+ func (sock * MockSocket ) Close () error {
4949 if sock .Receiver != nil {
5050 close (sock .Receiver )
5151 }
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ type chatBotStats struct {
4040 m map [string ]* expvar.Map
4141}
4242
43- func (s chatBotStats ) GetOrCreate (identifier string ) (* expvar.Map , bool ) {
43+ func (s * chatBotStats ) GetOrCreate (identifier string ) (* expvar.Map , bool ) {
4444 s .RLock ()
4545 chatbotStats , ok := s .m [identifier ]
4646 s .RUnlock ()
Original file line number Diff line number Diff line change @@ -176,7 +176,7 @@ func TestFlood(t *testing.T) {
176176 pingResponse : make (chan struct {}, 10 ), // HACK: This is to avoid the current deadlock
177177 sendQueue : make (chan []byte , 256 ),
178178 }
179- chatbot .init (mockSocket )
179+ chatbot .init (& mockSocket )
180180
181181 startTime := time .Now ()
182182
@@ -224,7 +224,7 @@ func TestUpdate(t *testing.T) {
224224 pingResponse : make (chan struct {}, 10 ), // HACK: This is to avoid the current deadlock
225225 sendQueue : make (chan []byte , 256 ),
226226 }
227- chatbot .init (mockSocket )
227+ chatbot .init (& mockSocket )
228228 conf := map [string ]string {
229229 "nick" : "test" , "password" : "testxyz" , "server" : "localhost" }
230230 channels = append (channels , & NEW_CHANNEL )
You can’t perform that action at this time.
0 commit comments