cft/bols_linux: Add Go implementation and Makefile
Add main entrypoint, gRPC server, local command executor, CLI parser,
version runner, and Makefile for bols_linux microservice.
BUG=b:535648254
TAG=agy
CONV=36a8a6f6-1fca-4066-b3ab-db52fba1ecdc
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
log.Fatalln("Failed to create log file: ", err)Using `log.Fatalln` inside a method like `Run` is generally discouraged as it prevents the caller from handling the error or performing cleanup. Since `Run` returns an `error`, consider returning the error here instead.
resolvedPath, err := os.Readlink(fn)Consider using `filepath.EvalSymlinks(fn)` which handles nested symlinks and relative paths more robustly than a single `Readlink` call.
stream.Send(&bols.GetFileResponse{The error from `stream.Send` should be checked and handled (e.g., logged and returned).
if err := stdin.Close(); err != nil {If `req.GetReqInfo()` was never received, or if `cmd.StdinPipe()` failed earlier, `stdin` will be `nil` here, leading to a panic. Please ensure `stdin` is non-nil before calling `Close`.
if _, err := io.Writer.Write(stdin, req.GetData()); err != nil {Same as above, `stdin` might be `nil` here if the protocol is not followed by the client or if initialization failed. Also, `io.Writer.Write(stdin, ...)` is very non-idiomatic. Use `stdin.Write(...)` instead.
body, _ := io.ReadAll(resp.Body)Reading the entire body without a limit can be risky if the server returns a very large error response. Consider using `io.LimitReader`.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
func parseRunMode(args []string) (runMode, error) {
if len(args) > 1 {Please fix this WARNING reported by golangci-lint: Linter: unparam
parseRunMode - result 1 (error) is always nil
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Done. Addressed all review comments in PS2:
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
cft/bols_linux: Add Go implementation and Makefile
Add Go entry point, CLI parser, server constructor, and Makefile
for bols_linux runner using lib/bols.
BUG=b:535648254
TAG=agy
CONV=36a8a6f6-1fca-4066-b3ab-db52fba1ecdc
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
cft/bols_linux: Add Go implementation and Makefile
Add Go entry point, CLI parser, server constructor, and Makefile
for bols_linux runner using lib/bols.
BUG=b:535648254
TAG=agy
CONV=36a8a6f6-1fca-4066-b3ab-db52fba1ecdc
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
cft/bols_linux: Add Go implementation and Makefile
Add Go entry point, CLI parser, server constructor, and Makefile
for bols_linux runner using lib/bols.
BUG=b:535648254
TAG=agy
CONV=36a8a6f6-1fca-4066-b3ab-db52fba1ecdc
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
cft/bols_linux: Add Go implementation and Makefile
Add Go entry point, CLI parser, server constructor, and Makefile
for bols_linux runner using lib/bols.
BUG=b:535648254
TAG=agy
CONV=36a8a6f6-1fca-4066-b3ab-db52fba1ecdc
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
cft/bols_linux: Add Go implementation and Makefile
Add Go entry point, CLI parser, server constructor, and Makefile
for bols_linux runner using lib/bols.
BUG=b:535648254
TAG=agy
CONV=36a8a6f6-1fca-4066-b3ab-db52fba1ecdc
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Auto-Submit | +1 |
| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |