Skip to content

Commit c045162

Browse files
committed
chg: format with goimports
1 parent b6bf42a commit c045162

25 files changed

+64
-42
lines changed

chatsample/main.go

+12-11
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@ import (
44
"context"
55
_ "embed"
66
"fmt"
7-
kitlog "github.com/go-kit/log"
8-
"github.com/philippseith/signalr"
9-
"github.com/philippseith/signalr/chatsample/middleware"
10-
"github.com/philippseith/signalr/chatsample/public"
117
"log"
128
"net/http"
139
"os"
1410
"strings"
1511
"time"
12+
13+
kitlog "github.com/go-kit/log"
14+
"github.com/philippseith/signalr"
15+
"github.com/philippseith/signalr/chatsample/middleware"
16+
"github.com/philippseith/signalr/chatsample/public"
1617
)
1718

1819
type chat struct {
@@ -142,13 +143,13 @@ func runHTTPServer(address string, hub signalr.HubInterface) {
142143
// c.Start()
143144
//}
144145

145-
type client struct {
146-
signalr.Hub
147-
}
148-
149-
func (c *client) Receive(msg string) {
150-
fmt.Println(msg)
151-
}
146+
//type client struct {
147+
// signalr.Hub
148+
//}
149+
//
150+
//func (c *client) Receive(msg string) {
151+
// fmt.Println(msg)
152+
//}
152153

153154
func main() {
154155
hub := &chat{}

chatsample/middleware/log_requests.go

-1
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,3 @@ func LogRequests(h http.Handler) http.Handler {
2727
fmt.Printf("%03d %s %s %v\n", status, method, uri, duration)
2828
})
2929
}
30-

client.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ import (
66
"encoding/json"
77
"errors"
88
"fmt"
9-
"github.com/go-kit/log"
109
"os"
1110
"reflect"
1211
"sync"
12+
13+
"github.com/go-kit/log"
1314
)
1415

1516
// Client is the signalR connection used on the client side.

client_test.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ import (
44
"context"
55
"errors"
66
"fmt"
7-
. "github.com/onsi/ginkgo"
8-
. "github.com/onsi/gomega"
97
"io"
108
"strings"
119
"sync/atomic"
1210
"time"
11+
12+
. "github.com/onsi/ginkgo"
13+
. "github.com/onsi/gomega"
1314
)
1415

1516
type pipeConnection struct {

connection_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ package signalr
33
import (
44
"context"
55
"encoding/json"
6+
"time"
7+
68
. "github.com/onsi/ginkgo"
79
. "github.com/onsi/gomega"
8-
"time"
910
)
1011

1112
var _ = Describe("Connection", func() {

doc.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
Package signalr contains a SignalR client and a SignalR server.
3-
Both support the transport types Websockets and Server-Sent Events
3+
Both support the transport types Websockets and Server-Sent Events
44
and the transfer formats Text (JSON) and Binary (MessagePack).
55
66
Basics

httpmux.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ import (
66
"encoding/json"
77
"fmt"
88
"net/http"
9-
"nhooyr.io/websocket"
109
"strconv"
1110
"strings"
1211
"sync"
12+
13+
"nhooyr.io/websocket"
1314
)
1415

1516
type httpMux struct {

hublifetimemanager.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
package signalr
22

33
import (
4-
"github.com/go-kit/log"
54
"sync"
5+
6+
"github.com/go-kit/log"
67
)
78

89
// HubLifetimeManager is a lifetime manager abstraction for hub instances

hubprotocol_test.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@ package signalr
33
import (
44
"bytes"
55
"fmt"
6-
"github.com/dave/jennifer/jen"
7-
. "github.com/onsi/ginkgo"
8-
. "github.com/onsi/gomega"
96
"go/ast"
107
"go/parser"
118
"go/token"
129
"io"
1310
"reflect"
1411
"testing"
1512
"time"
13+
14+
"github.com/dave/jennifer/jen"
15+
. "github.com/onsi/ginkgo"
16+
. "github.com/onsi/gomega"
1617
)
1718

1819
var _ = Describe("Protocol", func() {

invocation_test.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ package signalr
22

33
import (
44
"fmt"
5-
. "github.com/onsi/ginkgo"
6-
. "github.com/onsi/gomega"
75
"strings"
86
"time"
7+
8+
. "github.com/onsi/ginkgo"
9+
. "github.com/onsi/gomega"
910
)
1011

1112
var invocationQueue = make(chan string, 20)

jsonhubprotocol.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ import (
55
"encoding/json"
66
"errors"
77
"fmt"
8-
"github.com/go-kit/log"
98
"io"
109
"reflect"
10+
11+
"github.com/go-kit/log"
1112
)
1213

1314
// jsonHubProtocol is the JSON based SignalR protocol

logger_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ package signalr
22

33
import (
44
"encoding/json"
5-
"github.com/go-kit/log"
65
"io/ioutil"
76
"os"
7+
8+
"github.com/go-kit/log"
89
)
910

1011
type loggerConfig struct {

messagepackhubprotocol.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ import (
55
"encoding/binary"
66
"errors"
77
"fmt"
8+
"io"
9+
810
"github.com/go-kit/log"
911
"github.com/vmihailenco/msgpack/v5"
10-
"io"
1112
)
1213

1314
type messagePackHubProtocol struct {

messagepackhubprotocol_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ package signalr
22

33
import (
44
"bytes"
5+
"reflect"
6+
57
. "github.com/onsi/ginkgo"
68
. "github.com/onsi/gomega"
7-
"reflect"
89
)
910

1011
var _ = Describe("MessagePackHubProtocol", func() {

options.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ package signalr
22

33
import (
44
"errors"
5+
"time"
6+
57
"github.com/go-kit/log"
68
"github.com/go-kit/log/level"
7-
"time"
89
)
910

1011
// TimeoutInterval is the interval one Party will consider the other Party disconnected

party.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ package signalr
22

33
import (
44
"context"
5-
"github.com/go-kit/log"
65
"time"
6+
7+
"github.com/go-kit/log"
78
)
89

910
// Party is the common base of Server and Client. The Party methods are only used internally,

server.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ import (
66
"encoding/json"
77
"errors"
88
"fmt"
9-
"github.com/go-kit/log"
109
"net/http"
1110
"os"
1211
"reflect"
1312
"runtime/debug"
13+
14+
"github.com/go-kit/log"
1415
)
1516

1617
// Server is a SignalR server for one type of hub.

server_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ package signalr
22

33
import (
44
"context"
5+
"time"
6+
57
. "github.com/onsi/ginkgo"
68
. "github.com/onsi/gomega"
7-
"time"
89
)
910

1011
var _ = Describe("Server.HubClients", func() {

serveroptions_test.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ import (
44
"context"
55
"errors"
66
"fmt"
7+
"strings"
8+
"time"
9+
710
"github.com/go-kit/log"
811
"github.com/google/uuid"
912
. "github.com/onsi/ginkgo"
1013
. "github.com/onsi/gomega"
11-
"strings"
12-
"time"
1314
)
1415

1516
type singleHub struct {

serversseconnection.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@ import (
44
"context"
55
"errors"
66
"fmt"
7-
"github.com/teivah/onecontext"
87
"io"
98
"io/ioutil"
109
"net/http"
1110
"strings"
1211
"sync"
1312
"time"
13+
14+
"github.com/teivah/onecontext"
1415
)
1516

1617
type serverSSEConnection struct {

signalr_test/logger_test.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ package signalr_test
22

33
import (
44
"encoding/json"
5-
"github.com/go-kit/log"
6-
"github.com/philippseith/signalr"
75
"io/ioutil"
86
"os"
7+
8+
"github.com/go-kit/log"
9+
"github.com/philippseith/signalr"
910
)
1011

1112
type loggerConfig struct {

signalr_test/netconnection_test.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ package signalr_test
33
import (
44
"context"
55
"fmt"
6-
. "github.com/onsi/ginkgo"
7-
. "github.com/onsi/gomega"
8-
"github.com/philippseith/signalr"
96
"net"
107
"testing"
118
"time"
9+
10+
. "github.com/onsi/ginkgo"
11+
. "github.com/onsi/gomega"
12+
"github.com/philippseith/signalr"
1213
)
1314

1415
func TestSignalR(t *testing.T) {

streaminvocation_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
package signalr
22

33
import (
4+
"time"
5+
46
. "github.com/onsi/ginkgo"
57
. "github.com/onsi/gomega"
6-
"time"
78
)
89

910
var streamInvocationQueue = make(chan string, 20)

testingconnection_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ import (
66
"encoding/json"
77
"errors"
88
"fmt"
9-
"github.com/onsi/ginkgo"
109
"io"
1110
"sync"
1211
"time"
12+
13+
"github.com/onsi/ginkgo"
1314
)
1415

1516
type testingConnection struct {

websocketconnection.go

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"bytes"
55
"context"
66
"fmt"
7+
78
"github.com/teivah/onecontext"
89
"nhooyr.io/websocket"
910
)

0 commit comments

Comments
 (0)