GODT-1779: Remove go-imap

This commit is contained in:
James Houlahan
2022-08-26 17:00:21 +02:00
parent 3b0bc1ca15
commit 39433fe707
593 changed files with 12725 additions and 91626 deletions

View File

@ -27,7 +27,7 @@ import (
const translatedProcDarwin = "sysctl.proc_translated"
func getHostAarch() string {
func getHostArch() string {
host, err := sysinfo.Host()
if err != nil {
return "not-detected"

View File

@ -22,7 +22,7 @@ package sentry
import "github.com/elastic/go-sysinfo"
func getHostAarch() string {
func getHostArch() string {
host, err := sysinfo.Host()
if err != nil {
return "not-detected"

View File

@ -26,7 +26,6 @@ import (
"time"
"github.com/ProtonMail/proton-bridge/v2/internal/constants"
"github.com/ProtonMail/proton-bridge/v2/pkg/pmapi"
"github.com/getsentry/sentry-go"
"github.com/sirupsen/logrus"
)
@ -56,17 +55,21 @@ func init() { //nolint:gochecknoinits
type Reporter struct {
appName string
appVersion string
userAgent fmt.Stringer
identifier Identifier
hostArch string
}
type Identifier interface {
GetUserAgent() string
}
// NewReporter creates new sentry reporter with appName and appVersion to report.
func NewReporter(appName, appVersion string, userAgent fmt.Stringer) *Reporter {
func NewReporter(appName, appVersion string, identifier Identifier) *Reporter {
return &Reporter{
appName: appName,
appVersion: appVersion,
userAgent: userAgent,
hostArch: getHostAarch(),
identifier: identifier,
hostArch: getHostArch(),
}
}
@ -118,7 +121,7 @@ func (r *Reporter) scopedReport(context map[string]interface{}, doReport func())
"OS": runtime.GOOS,
"Client": r.appName,
"Version": r.appVersion,
"UserAgent": r.userAgent.String(),
"UserAgent": r.identifier.GetUserAgent(),
"HostArch": r.hostArch,
}
@ -189,6 +192,3 @@ func isFunctionFilteredOut(function string) bool {
func Flush(maxWaiTime time.Duration) {
sentry.Flush(maxWaiTime)
}
func (r *Reporter) SetClientFromManager(cm pmapi.Manager) {
}