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