Browse Source

Add TODO for multierror

oauth-gitea
Matt Baer 2 years ago
parent
commit
36b160b706
  1. 1
      app.go
  2. 1
      key/key.go

1
app.go

@ -496,6 +496,7 @@ func GenerateKeyFiles(app *App) error {
// Generate keys
initKeyPaths(app)
// TODO: use something like https://github.com/hashicorp/go-multierror to return errors
var keyErrs error
err := generateKey(emailKeyPath)
if err != nil {

1
key/key.go

@ -27,6 +27,7 @@ type Keychain struct {
// skipping any that already exist.
func (keys *Keychain) GenerateKeys() error {
// Generate keys only if they don't already exist
// TODO: use something like https://github.com/hashicorp/go-multierror to return errors
var err, keyErrs error
if len(keys.EmailKey) == 0 {
keys.EmailKey, err = GenerateBytes(EncKeysBytes)

Loading…
Cancel
Save