Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Commit

Permalink
chore: replace fmt.Println -> log.Warn
Browse files Browse the repository at this point in the history
Signed-off-by: Valery Piashchynski <piashchynski.valery@gmail.com>
  • Loading branch information
rustatian committed Apr 11, 2024
1 parent 6fdf39f commit 4ef694c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions ipc/pipe/pipe_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ type sr struct {
err error
}

// SpawnWorkerWithContext Creates new Process and connects it to goridge relay,
// method Wait() must be handled on level above.
// SpawnWorkerWithContext Creates a new Process and connects it to goridge relay,
// method Wait() must be handled on the level above.
func (f *Factory) SpawnWorkerWithContext(ctx context.Context, cmd *exec.Cmd, options ...worker.Options) (*worker.Process, error) {
spCh := make(chan sr)
go func() {
Expand Down
8 changes: 4 additions & 4 deletions ipc/socket/socket_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package socket
import (
"context"
stderr "errors"
"fmt"
"net"
"os/exec"
"sync"
Expand Down Expand Up @@ -50,7 +49,8 @@ func NewSocketServer(ls net.Listener, log *zap.Logger) *Factory {
return
}
}
fmt.Printf("[WARN]: socket server listen, error: %v\n", err)

log.Warn("socket server listen", zap.Error(err))
}
}()

Expand Down Expand Up @@ -85,7 +85,7 @@ type socketSpawn struct {
err error
}

// SpawnWorkerWithContext Creates Process and connects it to appropriate relay or return an error
// SpawnWorkerWithContext Creates a Process and connects it to the appropriate relay or return an error
func (f *Factory) SpawnWorkerWithContext(ctx context.Context, cmd *exec.Cmd, options ...worker.Options) (*worker.Process, error) {
c := make(chan socketSpawn)
go func() {
Expand Down Expand Up @@ -119,7 +119,7 @@ func (f *Factory) SpawnWorkerWithContext(ctx context.Context, cmd *exec.Cmd, opt
if err != nil {
_ = w.Kill()
select {
// try to write result
// try to write a result
case c <- socketSpawn{
w: nil,
err: err,
Expand Down

0 comments on commit 4ef694c

Please sign in to comment.