Merge pull request #899 from ijc25/prepareStdio-named-return
prepareStdio: use named return for err
This commit is contained in:
commit
ab137bfef8
@ -21,8 +21,8 @@ import (
|
|||||||
"google.golang.org/grpc/grpclog"
|
"google.golang.org/grpc/grpclog"
|
||||||
)
|
)
|
||||||
|
|
||||||
func prepareStdio(stdin, stdout, stderr string, console bool) (*sync.WaitGroup, error) {
|
func prepareStdio(stdin, stdout, stderr string, console bool) (wg *sync.WaitGroup, err error) {
|
||||||
var wg sync.WaitGroup
|
wg = &sync.WaitGroup{}
|
||||||
ctx := gocontext.Background()
|
ctx := gocontext.Background()
|
||||||
|
|
||||||
f, err := fifo.OpenFifo(ctx, stdin, syscall.O_WRONLY|syscall.O_CREAT|syscall.O_NONBLOCK, 0700)
|
f, err := fifo.OpenFifo(ctx, stdin, syscall.O_WRONLY|syscall.O_CREAT|syscall.O_NONBLOCK, 0700)
|
||||||
@ -73,7 +73,7 @@ func prepareStdio(stdin, stdout, stderr string, console bool) (*sync.WaitGroup,
|
|||||||
}(f)
|
}(f)
|
||||||
}
|
}
|
||||||
|
|
||||||
return &wg, nil
|
return wg, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func getGRPCConnection(context *cli.Context) (*grpc.ClientConn, error) {
|
func getGRPCConnection(context *cli.Context) (*grpc.ClientConn, error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user