mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-06-27 21:05:53 +00:00
run goimports
This commit is contained in:
parent
69e5434cc2
commit
922bda2218
16 changed files with 53 additions and 38 deletions
|
@ -1,13 +1,14 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"../../server"
|
||||
"fmt"
|
||||
"github.com/abiosoft/ishell"
|
||||
"github.com/gorilla/websocket"
|
||||
"runtime"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"../../server"
|
||||
"github.com/abiosoft/ishell"
|
||||
"github.com/gorilla/websocket"
|
||||
)
|
||||
|
||||
func commandLineConsole() {
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package main // import "bitbucket.org/stendec/frankerfacez/socketserver/cmd/ffzsocketserver"
|
||||
|
||||
import (
|
||||
"../../server"
|
||||
"encoding/json"
|
||||
"flag"
|
||||
"fmt"
|
||||
|
@ -9,6 +8,8 @@ import (
|
|||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
|
||||
"../../server"
|
||||
)
|
||||
|
||||
import _ "net/http/pprof"
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"../../server"
|
||||
"encoding/gob"
|
||||
"flag"
|
||||
"fmt"
|
||||
"github.com/clarkduvall/hyperloglog"
|
||||
"net/http"
|
||||
"os"
|
||||
|
||||
"../../server"
|
||||
"github.com/clarkduvall/hyperloglog"
|
||||
)
|
||||
|
||||
var SERVERS = []string{
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"bitbucket.org/stendec/frankerfacez/socketserver/server"
|
||||
"html/template"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"bitbucket.org/stendec/frankerfacez/socketserver/server"
|
||||
)
|
||||
|
||||
type CalendarData struct {
|
||||
|
|
|
@ -1,17 +1,18 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"time"
|
||||
"io"
|
||||
"fmt"
|
||||
"os"
|
||||
"net/http"
|
||||
"errors"
|
||||
"sync"
|
||||
"github.com/hashicorp/golang-lru"
|
||||
"github.com/clarkduvall/hyperloglog"
|
||||
"bitbucket.org/stendec/frankerfacez/socketserver/server"
|
||||
"encoding/gob"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"os"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"bitbucket.org/stendec/frankerfacez/socketserver/server"
|
||||
"github.com/clarkduvall/hyperloglog"
|
||||
"github.com/hashicorp/golang-lru"
|
||||
)
|
||||
|
||||
type serverFilter struct {
|
||||
|
|
|
@ -6,8 +6,6 @@ import (
|
|||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/pmylund/go-cache"
|
||||
"golang.org/x/crypto/nacl/box"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"net/http"
|
||||
|
@ -16,6 +14,9 @@ import (
|
|||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/pmylund/go-cache"
|
||||
"golang.org/x/crypto/nacl/box"
|
||||
)
|
||||
|
||||
const bPathAnnounceStartup = "/startup"
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
package server
|
||||
|
||||
import (
|
||||
. "gopkg.in/check.v1"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"testing"
|
||||
|
||||
. "gopkg.in/check.v1"
|
||||
)
|
||||
|
||||
func Test(t *testing.T) { TestingT(t) }
|
||||
|
|
|
@ -4,13 +4,14 @@ import (
|
|||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/gorilla/websocket"
|
||||
"github.com/satori/go.uuid"
|
||||
"log"
|
||||
"net/url"
|
||||
"strconv"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/gorilla/websocket"
|
||||
"github.com/satori/go.uuid"
|
||||
)
|
||||
|
||||
// Command is a string indicating which RPC is requested.
|
||||
|
|
|
@ -2,8 +2,9 @@ package server
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/gorilla/websocket"
|
||||
"testing"
|
||||
|
||||
"github.com/gorilla/websocket"
|
||||
)
|
||||
|
||||
func ExampleUnmarshalClientMessage() {
|
||||
|
|
|
@ -4,11 +4,12 @@ import (
|
|||
"bytes"
|
||||
"crypto/rand"
|
||||
"encoding/base64"
|
||||
irc "github.com/fluffle/goirc/client"
|
||||
"log"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
irc "github.com/fluffle/goirc/client"
|
||||
)
|
||||
|
||||
type AuthCallback func(client *ClientInfo, successful bool)
|
||||
|
|
|
@ -2,8 +2,6 @@ package server
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/gorilla/websocket"
|
||||
"github.com/satori/go.uuid"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"net/url"
|
||||
|
@ -12,6 +10,9 @@ import (
|
|||
"syscall"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/gorilla/websocket"
|
||||
"github.com/satori/go.uuid"
|
||||
)
|
||||
|
||||
const TestOrigin = "http://www.twitch.tv"
|
||||
|
|
|
@ -3,16 +3,17 @@ package server
|
|||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/gorilla/websocket"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"net/url"
|
||||
"os"
|
||||
"strconv"
|
||||
"sync"
|
||||
"testing"
|
||||
"time"
|
||||
"strconv"
|
||||
|
||||
"github.com/gorilla/websocket"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -3,19 +3,19 @@ package server
|
|||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/satori/go.uuid"
|
||||
"net"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/satori/go.uuid"
|
||||
)
|
||||
|
||||
const NegativeOne = ^uint64(0)
|
||||
|
||||
type ConfigFile struct {
|
||||
// Numeric server id known to the backend
|
||||
ServerID int
|
||||
ServerID int
|
||||
// Address to bind the HTTP server to on startup.
|
||||
ListenAddr string
|
||||
ListenAddr string
|
||||
// Address to bind the TLS server to on startup.
|
||||
SSLListenAddr string
|
||||
// URL to the backend server
|
||||
|
@ -24,15 +24,15 @@ type ConfigFile struct {
|
|||
// Minimum memory to accept a new connection
|
||||
MinMemoryKBytes uint64
|
||||
// Maximum # of clients that can be connected. 0 to disable.
|
||||
MaxClientCount uint64
|
||||
MaxClientCount uint64
|
||||
|
||||
// SSL/TLS
|
||||
// Enable the use of SSL.
|
||||
UseSSL bool
|
||||
UseSSL bool
|
||||
// Path to certificate file.
|
||||
SSLCertificateFile string
|
||||
// Path to key file.
|
||||
SSLKeyFile string
|
||||
SSLKeyFile string
|
||||
|
||||
UseESLogStashing bool
|
||||
ESServer string
|
||||
|
|
|
@ -12,9 +12,10 @@ import (
|
|||
"os"
|
||||
"time"
|
||||
|
||||
"io"
|
||||
|
||||
"github.com/clarkduvall/hyperloglog"
|
||||
"github.com/satori/go.uuid"
|
||||
"io"
|
||||
)
|
||||
|
||||
// UuidHash implements a hash for uuid.UUID by XORing the random bits.
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
package server
|
||||
|
||||
import (
|
||||
"github.com/satori/go.uuid"
|
||||
"net/http/httptest"
|
||||
"net/url"
|
||||
"os"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/satori/go.uuid"
|
||||
)
|
||||
|
||||
func TestUniqueConnections(t *testing.T) {
|
||||
|
|
|
@ -5,10 +5,11 @@ import (
|
|||
"crypto/rand"
|
||||
"encoding/base64"
|
||||
"errors"
|
||||
"golang.org/x/crypto/nacl/box"
|
||||
"net/url"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"golang.org/x/crypto/nacl/box"
|
||||
)
|
||||
|
||||
func FillCryptoRandom(buf []byte) error {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue