Run gofmt

This commit is contained in:
Jeffrey Picard 2021-11-24 18:24:06 -05:00
parent 0a1ba43d66
commit 72ea236d86
8 changed files with 150 additions and 158 deletions

View file

@ -31,4 +31,3 @@ var (
Help: "Number of peers that are subscribed to us.", Help: "Number of peers that are subscribed to us.",
}) })
) )

View file

@ -33,6 +33,7 @@ type Args struct {
StartPrometheus bool StartPrometheus bool
StartUDP bool StartUDP bool
WritePeers bool WritePeers bool
DisableFederation bool
} }
const ( const (

View file

@ -32,7 +32,6 @@ var (
} }
) )
// peerKey takes a ServerMessage object and returns the key that for that peer // peerKey takes a ServerMessage object and returns the key that for that peer
// in our peer table. // in our peer table.
func peerKey(msg *pb.ServerMessage) string { func peerKey(msg *pb.ServerMessage) string {
@ -117,7 +116,6 @@ retry:
} }
cancel() cancel()
f, err := os.Open(peerFile) f, err := os.Open(peerFile)
if err != nil { if err != nil {
log.Println(err) log.Println(err)

View file

@ -188,7 +188,6 @@ func TestAddPeerEndpoint(t *testing.T) {
args2 := makeDefaultArgs() args2 := makeDefaultArgs()
args2.Port = "50052" args2.Port = "50052"
tests := []struct { tests := []struct {
name string name string
wantServerOne int64 wantServerOne int64
@ -262,7 +261,6 @@ func TestAddPeerEndpoint2(t *testing.T) {
args2.Port = "50052" args2.Port = "50052"
args3.Port = "50053" args3.Port = "50053"
tests := []struct { tests := []struct {
name string name string
wantServerOne int64 wantServerOne int64
@ -335,7 +333,6 @@ func TestAddPeerEndpoint2(t *testing.T) {
} }
// TestAddPeerEndpoint3 tests the ability to add peers // TestAddPeerEndpoint3 tests the ability to add peers
func TestAddPeerEndpoint3(t *testing.T) { func TestAddPeerEndpoint3(t *testing.T) {
ctx := context.Background() ctx := context.Background()
@ -345,7 +342,6 @@ func TestAddPeerEndpoint3(t *testing.T) {
args2.Port = "50052" args2.Port = "50052"
args3.Port = "50053" args3.Port = "50053"
tests := []struct { tests := []struct {
name string name string
wantServerOne int64 wantServerOne int64
@ -426,7 +422,6 @@ func TestAddPeerEndpoint3(t *testing.T) {
} }
// TestAddPeer tests the ability to add peers // TestAddPeer tests the ability to add peers
func TestUDPServer(t *testing.T) { func TestUDPServer(t *testing.T) {
ctx := context.Background() ctx := context.Background()

View file

@ -967,4 +967,3 @@ func removeBlocked(searchHits []*record) ([]*record, []*record, map[string]*pb.B
return newHits, blockedHits, blockedChannels return newHits, blockedHits, blockedChannels
} }

View file

@ -45,7 +45,6 @@ type Server struct {
pb.UnimplementedHubServer pb.UnimplementedHubServer
} }
func getVersion() string { func getVersion() string {
return meta.Version return meta.Version
} }

View file

@ -12,6 +12,7 @@ import (
) )
const maxBufferSize = 1024 const maxBufferSize = 1024
// genesis blocktime (which is actually wrong) // genesis blocktime (which is actually wrong)
const magic = 1446058291 const magic = 1446058291
const protocolVersion = 1 const protocolVersion = 1