Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: keybase/go-keychain
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 7f41edfa9689
Choose a base ref
...
head repository: keybase/go-keychain
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.0.1
Choose a head ref
  • 1 commit
  • 4 files changed
  • 1 contributor

Commits on Feb 27, 2025

  1. secretservice: replace pkg/errors for Go stdlib errors, and fix unhan…

    …dled error (#111)
    
    * secretservice: fix SecretService.PromptAndWait discarding error
    
    This code was always returning a nil error instead of the error produced
    by the org.freedesktop.Secret.Prompt.Prompt call.
    
    Signed-off-by: Sebastiaan van Stijn <[email protected]>
    
    * secretservice: SecretService.openSessionRaw explicitly handle error
    
    pkg/errors' errors.Wrap function implicitly discards nil-errors. While
    this is convenient, it also can be err-prone, as this behavior differs
    from go stdlib, making it easy to miss conditions where the reader assumes
    an error is returned (but in reality no error).
    
    This patch updates the code to explicitly handle non-nil errors to prevent
    accidental regressions if this code would be rewritten using go stdlib.
    
    Signed-off-by: Sebastiaan van Stijn <[email protected]>
    
    * secretservice: rename var that shadowed type
    
    Signed-off-by: Sebastiaan van Stijn <[email protected]>
    
    * secretservice: fix GoDoc comment
    
    Signed-off-by: Sebastiaan van Stijn <[email protected]>
    
    * secretservice: replace pkg/errors for Go stdlib errors
    
    The pkg/errors dependency was introduced with the secretservice implementation
    in 7f2ef9f in March 2019.
    
    go1.13 (September 2019) introduced native support for unwrapping errors, no
    longer requiring this dependency to be used, and the pkg/errors module has
    been archived (as feature complete).
    
    While pkg/errors does have some advantages (for example, it can provide a
    stack trace), this functionality doesn't appear to be used in this module,
    and the pkg/errors package is not used in other implementations (for macOS).
    
    This patch removes the dependency, replacing its use for the equivalent
    in Go stdlib.
    
    Signed-off-by: Sebastiaan van Stijn <[email protected]>
    
    ---------
    
    Signed-off-by: Sebastiaan van Stijn <[email protected]>
    thaJeztah authored Feb 27, 2025
    Configuration menu
    Copy the full SHA
    dd79abb View commit details
    Browse the repository at this point in the history
Loading