Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adding `Action` options. * Using options in `New()`. * Adding `Action.getenv` and `OptGetEnv` helper. * Adding godoc for `Opt*()` helpers. * Adding `getenv` default in `New()`. * Replacing `os.Getenv` usage with `Action.getenv`. * Ditching `Action.setEnv` in favor of using `OptGetenv`. * Ditching `Action.addPath` in favor of using `OptGetenv`. * Ditching `Action.getInput` in favor of using `OptGetenv`. * Ditching `Action.issueFileCommand` in favor of using `OptGetenv`. * Ditching `NewWithWriter` in tests. This will make it easier to deprecate `NewWithWriter` later. * Adding test for `NewWithWriter`. * Fix year in new `options_test.go`. * Modifying `Option` so it also returns an `Action`. * Adding a `nil`-guard for `opt` in `New()`. * Adding deprecation notice to godoc for `NewWithWriter()`. * Renaming `Opt*` to `With*` for options. The diff was completely generated via: ``` git grep -l OptWriter | xargs sed -i '' s/OptWriter/WithWriter/g git grep -l OptFields | xargs sed -i '' s/OptFields/WithFields/g git grep -l OptGetenv | xargs sed -i '' s/OptGetenv/WithGetenv/g ``` so reviewing the whole diff is not necessary (if that makes code review easier). * Exporting `getenvFunc`. Done via: ``` git grep -l getenvFunc | xargs sed -i '' s/getenvFunc/GetenvFunc/g ```
- Loading branch information
Showing
4 changed files
with
188 additions
and
56 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
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.