From 743a2f8dacacdcbf5f327772f404fed1020b910f Mon Sep 17 00:00:00 2001 From: James Houlahan Date: Thu, 18 Aug 2022 15:03:04 +0200 Subject: [PATCH] Other(refactor): Remove unused frontend args --- internal/app/base/base.go | 15 ++++++++------- internal/app/bridge/bridge.go | 3 --- internal/frontend/frontend.go | 5 ----- internal/frontend/grpc/service.go | 6 ------ 4 files changed, 8 insertions(+), 21 deletions(-) diff --git a/internal/app/base/base.go b/internal/app/base/base.go index 9dc5ec7e..44dedbf3 100644 --- a/internal/app/base/base.go +++ b/internal/app/base/base.go @@ -17,13 +17,14 @@ // Package base implements a common application base currently shared by bridge and IE. // The base includes the following: -// - access to standard filesystem locations like config, cache, logging dirs -// - an extensible crash handler -// - versioned cache directory -// - persistent settings -// - event listener -// - credentials store -// - pmapi Manager +// - access to standard filesystem locations like config, cache, logging dirs +// - an extensible crash handler +// - versioned cache directory +// - persistent settings +// - event listener +// - credentials store +// - pmapi Manager +// // In addition, the base initialises logging and reacts to command line arguments // which control the log verbosity and enable cpu/memory profiling. package base diff --git a/internal/app/bridge/bridge.go b/internal/app/bridge/bridge.go index a3422a09..30047ac0 100644 --- a/internal/app/bridge/bridge.go +++ b/internal/app/bridge/bridge.go @@ -156,9 +156,6 @@ func mailLoop(b *base.Base, c *cli.Context) error { //nolint:funlen } f := frontend.New( - constants.Version, - constants.BuildVersion, - b.Name, frontendMode, !c.Bool(base.FlagNoWindow), b.CrashHandler, diff --git a/internal/frontend/frontend.go b/internal/frontend/frontend.go index be74865a..7c901de7 100644 --- a/internal/frontend/frontend.go +++ b/internal/frontend/frontend.go @@ -42,9 +42,6 @@ type Frontend interface { // New returns initialized frontend based on `frontendType`, which can be `cli` or `grpc`. func New( - version, - buildVersion, - programName, frontendType string, showWindowOnStart bool, panicHandler types.PanicHandler, @@ -62,8 +59,6 @@ func New( switch frontendType { case "grpc": return grpc.NewService( - version, - programName, showWindowOnStart, panicHandler, tls, diff --git a/internal/frontend/grpc/service.go b/internal/frontend/grpc/service.go index 83501c42..ed7683b1 100644 --- a/internal/frontend/grpc/service.go +++ b/internal/frontend/grpc/service.go @@ -52,8 +52,6 @@ type Service struct { // nolint:structcheck eventStreamCh chan *StreamEvent eventStreamDoneCh chan struct{} - programName string - programVersion string panicHandler types.PanicHandler tls *bridgetls.TLS locations *locations.Locations @@ -77,8 +75,6 @@ type Service struct { // nolint:structcheck // NewService returns a new instance of the service. func NewService( - version, - programName string, showOnStartup bool, panicHandler types.PanicHandler, tls *bridgetls.TLS, @@ -94,8 +90,6 @@ func NewService( ) *Service { s := Service{ UnimplementedBridgeServer: UnimplementedBridgeServer{}, - programName: programName, - programVersion: version, panicHandler: panicHandler, tls: tls, locations: locations,