Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve nil value when no errors have occurred. #8

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Commits on Aug 11, 2016

  1. Preserve nil value when no errors have occurred.

    This patch handles nil values when passed into the slice argument
    of AppendNonNil(err error, errs ...error). nil values are filtered
    out and not included in the multierror. When the first argument
    to AppendNonNil is nil, and the second argument consists entirely
    of nil values, then return a nil value.
    
    This patch allows the usage the following style.
    
    ```
    var result error
    
    result = multierror.AppendNonNil(result, step1())
    result = multierror.AppendNonNil(result, step2())
    
    return result
    ```
    
    result will be nil if-and-only-if step1() and step2()
    both return nil.
    mspiegel authored and Michael Spiegel committed Aug 11, 2016
    Configuration menu
    Copy the full SHA
    fa33db1 View commit details
    Browse the repository at this point in the history
  2. Add travis stuff

    sethvargo committed Aug 11, 2016
    Configuration menu
    Copy the full SHA
    1e17297 View commit details
    Browse the repository at this point in the history
  3. Add deps script

    sethvargo committed Aug 11, 2016
    Configuration menu
    Copy the full SHA
    35878e7 View commit details
    Browse the repository at this point in the history
  4. Merge remote-tracking branch 'upstream/master'

    mspiegel authored and Michael Spiegel committed Aug 11, 2016
    Configuration menu
    Copy the full SHA
    6146a39 View commit details
    Browse the repository at this point in the history
  5. Bug fix for nil interface in appendNonNil()

    mspiegel authored and Michael Spiegel committed Aug 11, 2016
    Configuration menu
    Copy the full SHA
    a20743b View commit details
    Browse the repository at this point in the history
  6. Another AppendNonNil interface bugfix.

    Do not convert 'nil' error to 'nil' *Error.
    mspiegel authored and Michael Spiegel committed Aug 11, 2016
    Configuration menu
    Copy the full SHA
    c2714b7 View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2016

  1. Bug fix AppendNonNil. Preserve input when errs list is empty.

    When the filtered errs list has zero length then preserve
    the input error.
    mspiegel authored and Michael Spiegel committed Aug 16, 2016
    Configuration menu
    Copy the full SHA
    c966ec9 View commit details
    Browse the repository at this point in the history

Commits on Aug 29, 2016

  1. Bug fix for struct error types.

    mspiegel authored and Michael Spiegel committed Aug 29, 2016
    Configuration menu
    Copy the full SHA
    4ad7911 View commit details
    Browse the repository at this point in the history

Commits on Oct 19, 2016

  1. Preserve output value when only when error is produced

    mspiegel authored and Michael Spiegel committed Oct 19, 2016
    Configuration menu
    Copy the full SHA
    a907df9 View commit details
    Browse the repository at this point in the history

Commits on Mar 9, 2017

  1. Configuration menu
    Copy the full SHA
    5b98f73 View commit details
    Browse the repository at this point in the history
  2. Update vendor.json

    Change root path to fork
    mspiegel committed Mar 9, 2017
    Configuration menu
    Copy the full SHA
    065aa64 View commit details
    Browse the repository at this point in the history

Commits on Nov 23, 2017

  1. Cleanup. Remove unused functions.

    Clarify README.md documentation.
    mspiegel committed Nov 23, 2017
    Configuration menu
    Copy the full SHA
    dd14681 View commit details
    Browse the repository at this point in the history
  2. Delete .travis.yml

    mspiegel committed Nov 23, 2017
    Configuration menu
    Copy the full SHA
    ea68e72 View commit details
    Browse the repository at this point in the history