Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove cli.Context from main goss packages (#546)
* remote cli.Context from main goss packages This turns the cli.Context into a plain struct and passes the struct, or fields from the struct, into all the various goss internals. This is a step one towards being able to use goss as a package without requiring the CLI stuff * add comments to new functionality * remove os.Exit() and use error propagation instead This is the result of simply grepping through the code and finding os.Exit(1) and replacing those with err being returned, also a few places errors were ignored I now return them so there might be a bit of additional errors appearing - but I think they are good it's mostly around WriteJson and fails to add resources - error reporting there seems like a good thing * remove some log.Fatal() calls * Update cmd/goss/goss.go Co-authored-by: Ahmed Elsabbahy <aelsabbahy@users.noreply.github.com>
- Loading branch information
1 parent
da32f41
commit 81b227a
Showing
11 changed files
with
387 additions
and
234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.