Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ShimShtein committed Oct 12, 2023
1 parent 38365e1 commit 22538e1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"github.com/pelletier/go-toml"
pb "github.com/redhatinsights/yggdrasil/protocol"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
)

var yggdDispatchSocketAddr string
Expand Down Expand Up @@ -65,7 +66,7 @@ func main() {
}

// Dial the dispatcher on its well-known address.
conn, err := grpc.Dial(yggdDispatchSocketAddr, grpc.WithInsecure())
conn, err := grpc.Dial(yggdDispatchSocketAddr, grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
log.Fatal(err)
}
Expand Down
7 changes: 4 additions & 3 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ import (
"bytes"
"context"
"encoding/json"
"io/ioutil"
"io"
"net/http"

"git.sr.ht/~spc/go-log"
pb "github.com/redhatinsights/yggdrasil/protocol"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
)

// forwarderServer implements the Worker gRPC service as defined by the yggdrasil
Expand All @@ -36,7 +37,7 @@ func (s *forwarderServer) Send(ctx context.Context, d *pb.Data) (*pb.Receipt, er
log.Tracef("received data: %#v", d)

// Dial the Dispatcher and call "Finish"
conn, err := grpc.Dial(yggdDispatchSocketAddr, grpc.WithInsecure())
conn, err := grpc.Dial(yggdDispatchSocketAddr, grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
log.Fatal(err)
}
Expand All @@ -59,7 +60,7 @@ func (s *forwarderServer) Send(ctx context.Context, d *pb.Data) (*pb.Receipt, er

log.Tracef("response Status: %v", response.Status)
log.Tracef("response Headers: %+v", response.Header)
body, _ := ioutil.ReadAll(response.Body)
body, _ := io.ReadAll(response.Body)
log.Tracef("response Body: %v", string(body))

}()
Expand Down

0 comments on commit 22538e1

Please sign in to comment.