mirror of
https://github.com/raz-varren/sacrificial-socket.git
synced 2025-10-12 19:40:04 +08:00
I fmted
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
package ssgrpc
|
||||
|
||||
import (
|
||||
"google.golang.org/grpc"
|
||||
"github.com/raz-varren/sacrificial-socket/backend/ssgrpc/transport"
|
||||
"google.golang.org/grpc"
|
||||
//"sync"
|
||||
)
|
||||
|
||||
|
@@ -1,9 +1,9 @@
|
||||
package ssgrpc
|
||||
|
||||
import (
|
||||
"golang.org/x/net/context"
|
||||
"github.com/raz-varren/sacrificial-socket/backend/ssgrpc/token"
|
||||
"github.com/raz-varren/sacrificial-socket/log"
|
||||
"golang.org/x/net/context"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
@@ -3,12 +3,12 @@ package ssgrpc
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"golang.org/x/net/context"
|
||||
"google.golang.org/grpc/metadata"
|
||||
ss "github.com/raz-varren/sacrificial-socket"
|
||||
"github.com/raz-varren/sacrificial-socket/backend/ssgrpc/token"
|
||||
"github.com/raz-varren/sacrificial-socket/backend/ssgrpc/transport"
|
||||
"github.com/raz-varren/sacrificial-socket/log"
|
||||
"golang.org/x/net/context"
|
||||
"google.golang.org/grpc/metadata"
|
||||
"strings"
|
||||
"sync"
|
||||
)
|
||||
|
@@ -2,13 +2,13 @@ package ssgrpc
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
ss "github.com/raz-varren/sacrificial-socket"
|
||||
"github.com/raz-varren/sacrificial-socket/backend/ssgrpc/transport"
|
||||
"github.com/raz-varren/sacrificial-socket/log"
|
||||
"golang.org/x/net/context"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials"
|
||||
"net"
|
||||
ss "github.com/raz-varren/sacrificial-socket"
|
||||
"github.com/raz-varren/sacrificial-socket/backend/ssgrpc/transport"
|
||||
"github.com/raz-varren/sacrificial-socket/log"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
@@ -2,11 +2,11 @@ package ssmongo
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
ss "github.com/raz-varren/sacrificial-socket"
|
||||
"github.com/raz-varren/sacrificial-socket/log"
|
||||
"gopkg.in/mgo.v2"
|
||||
"gopkg.in/mgo.v2/bson"
|
||||
"io"
|
||||
ss "github.com/raz-varren/sacrificial-socket"
|
||||
"github.com/raz-varren/sacrificial-socket/log"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
@@ -3,11 +3,11 @@ package main
|
||||
import (
|
||||
"encoding/json"
|
||||
"flag"
|
||||
"github.com/raz-varren/sacrificial-socket"
|
||||
"github.com/raz-varren/sacrificial-socket/backend/ssgrpc"
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"github.com/raz-varren/sacrificial-socket"
|
||||
"github.com/raz-varren/sacrificial-socket/backend/ssgrpc"
|
||||
"strings"
|
||||
//"time"
|
||||
)
|
||||
@@ -141,7 +141,6 @@ func RoomcastJSON(s *ss.Socket, data []byte) {
|
||||
s.Roomcast(r.Room, "roomcastjson", r)
|
||||
}
|
||||
|
||||
|
||||
func Broadcast(s *ss.Socket, data []byte) {
|
||||
s.Broadcast("broadcast", string(data))
|
||||
}
|
||||
|
@@ -2,9 +2,9 @@ package main
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
ss "github.com/raz-varren/sacrificial-socket"
|
||||
"log"
|
||||
"net/http"
|
||||
ss "github.com/raz-varren/sacrificial-socket"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
@@ -8,12 +8,12 @@ Sacrificial-Socket also has a MultihomeBackend interface for syncronizing broadc
|
||||
package ss
|
||||
|
||||
import (
|
||||
"github.com/raz-varren/sacrificial-socket/log"
|
||||
"golang.org/x/net/websocket"
|
||||
"io"
|
||||
"net/http"
|
||||
"os"
|
||||
"os/signal"
|
||||
"github.com/raz-varren/sacrificial-socket/log"
|
||||
"sync"
|
||||
"syscall"
|
||||
)
|
||||
@@ -158,7 +158,6 @@ func (serv *SocketServer) loop(ws *websocket.Conn) {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
eventName := ""
|
||||
contentIdx := 0
|
||||
|
||||
|
@@ -2,10 +2,10 @@ package ss_test
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/raz-varren/sacrificial-socket"
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"github.com/raz-varren/sacrificial-socket"
|
||||
)
|
||||
|
||||
func ExampleNewServer() {
|
||||
|
Reference in New Issue
Block a user