Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion addon/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Tackle hub/addon integration.
package addon

import (
"fmt"
"os"

logapi "github.com/go-logr/logr"
Expand Down Expand Up @@ -80,6 +81,8 @@ type Adapter struct {
Task
// Log API.
Log logapi.Logger
// Wrap error API.
Wrap func(error, ...any) error
// Settings API.
Setting Setting
// Schema API
Expand Down Expand Up @@ -125,7 +128,7 @@ func (h *Adapter) Run(addon func() error) {
if pErr, cast := r.(error); cast {
err = pErr
} else {
panic(r)
err = fmt.Errorf("%#v", r)
}
}
if err != nil {
Expand Down Expand Up @@ -164,6 +167,7 @@ func newAdapter() (adapter *Adapter) {
richClient: richClient,
},
Log: Log,
Wrap: Wrap,
Setting: richClient.Setting,
Schema: richClient.Schema,
Application: richClient.Application,
Expand Down
Loading