@@ -568,9 +568,9 @@ func (c *haCoordinator) handlePubsubMessage(ctx context.Context, message []byte)
568
568
func (c * haCoordinator ) formatCallMeMaybe (recipient uuid.UUID , nodes []* agpl.Node ) ([]byte , error ) {
569
569
buf := bytes.Buffer {}
570
570
571
- buf .WriteString (c .id .String () + "|" )
572
- buf .WriteString ("callmemaybe|" )
573
- buf .WriteString (recipient .String () + "|" )
571
+ _ , _ = buf .WriteString (c .id .String () + "|" )
572
+ _ , _ = buf .WriteString ("callmemaybe|" )
573
+ _ , _ = buf .WriteString (recipient .String () + "|" )
574
574
err := json .NewEncoder (& buf ).Encode (nodes )
575
575
if err != nil {
576
576
return nil , xerrors .Errorf ("encode node: %w" , err )
@@ -583,9 +583,9 @@ func (c *haCoordinator) formatCallMeMaybe(recipient uuid.UUID, nodes []*agpl.Nod
583
583
func (c * haCoordinator ) formatAgentHello (id uuid.UUID ) ([]byte , error ) {
584
584
buf := bytes.Buffer {}
585
585
586
- buf .WriteString (c .id .String () + "|" )
587
- buf .WriteString ("agenthello|" )
588
- buf .WriteString (id .String () + "|" )
586
+ _ , _ = buf .WriteString (c .id .String () + "|" )
587
+ _ , _ = buf .WriteString ("agenthello|" )
588
+ _ , _ = buf .WriteString (id .String () + "|" )
589
589
590
590
return buf .Bytes (), nil
591
591
}
@@ -594,9 +594,9 @@ func (c *haCoordinator) formatAgentHello(id uuid.UUID) ([]byte, error) {
594
594
func (c * haCoordinator ) formatClientHello (id uuid.UUID ) ([]byte , error ) {
595
595
buf := bytes.Buffer {}
596
596
597
- buf .WriteString (c .id .String () + "|" )
598
- buf .WriteString ("clienthello|" )
599
- buf .WriteString (id .String () + "|" )
597
+ _ , _ = buf .WriteString (c .id .String () + "|" )
598
+ _ , _ = buf .WriteString ("clienthello|" )
599
+ _ , _ = buf .WriteString (id .String () + "|" )
600
600
601
601
return buf .Bytes (), nil
602
602
}
@@ -605,9 +605,9 @@ func (c *haCoordinator) formatClientHello(id uuid.UUID) ([]byte, error) {
605
605
func (c * haCoordinator ) formatAgentUpdate (id uuid.UUID , node * agpl.Node ) ([]byte , error ) {
606
606
buf := bytes.Buffer {}
607
607
608
- buf .WriteString (c .id .String () + "|" )
609
- buf .WriteString ("agentupdate|" )
610
- buf .WriteString (id .String () + "|" )
608
+ _ , _ = buf .WriteString (c .id .String () + "|" )
609
+ _ , _ = buf .WriteString ("agentupdate|" )
610
+ _ , _ = buf .WriteString (id .String () + "|" )
611
611
err := json .NewEncoder (& buf ).Encode (node )
612
612
if err != nil {
613
613
return nil , xerrors .Errorf ("encode node: %w" , err )
@@ -622,8 +622,8 @@ func (c *haCoordinator) ServeHTTPDebug(w http.ResponseWriter, r *http.Request) {
622
622
c .mutex .RLock ()
623
623
defer c .mutex .RUnlock ()
624
624
625
- fmt .Fprintln (w , "<h1>high-availability wireguard coordinator debug</h1>" )
626
- fmt .Fprintln (w , "<h4 style=\" margin-top:-25px\" >warning: this only provides info from the node that served the request, if there are multiple replicas this data may be incomplete</h4>" )
625
+ _ , _ = fmt .Fprintln (w , "<h1>high-availability wireguard coordinator debug</h1>" )
626
+ _ , _ = fmt .Fprintln (w , "<h4 style=\" margin-top:-25px\" >warning: this only provides info from the node that served the request, if there are multiple replicas this data may be incomplete</h4>" )
627
627
628
628
agpl .CoordinatorHTTPDebug (c .agentSockets , c .agentToConnectionSockets , c .agentNameCache )(w , r )
629
629
}
0 commit comments