From e301fca3ccfabc398d39ae1bc23b14c80b730b8f Mon Sep 17 00:00:00 2001 From: MickaelK Date: Thu, 10 Sep 2026 16:06:03 +1000 Subject: [PATCH] chore (maitenance): cleanup whitelabeling funcs --- server/common/index.go | 4 ++-- server/pkg/env/whitelabel.go | 21 ++++----------------- 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/server/common/index.go b/server/common/index.go index 6e4bc9ee..5abc52da 100644 --- a/server/common/index.go +++ b/server/common/index.go @@ -175,9 +175,9 @@ var ( WithBase = env.WithBase TrimBase = env.TrimBase IsWhiteLabel = env.IsWhiteLabel - LicensedAs = env.LicensedAs - WithBrand = env.WithBrand WhiteLabelText = env.WhiteLabelText + PROGRAM_LICENSE = env.PROGRAM_LICENSE + PROGRAM_NAME = env.PROGRAM_NAME ) // files diff --git a/server/pkg/env/whitelabel.go b/server/pkg/env/whitelabel.go index f684f855..051481d8 100644 --- a/server/pkg/env/whitelabel.go +++ b/server/pkg/env/whitelabel.go @@ -11,23 +11,10 @@ func WhiteLabelText(a, b string) string { return a } -type licenseOption struct { - license string - product string +func PROGRAM_LICENSE(license string) { + LICENSE = license } -func LicensedAs(license string, opts ...func(*licenseOption)) { - cfg := licenseOption{ - license: license, - product: APPNAME, - } - for _, opt := range opts { - opt(&cfg) - } - LICENSE = cfg.license - APPNAME = cfg.product -} - -func WithBrand(name string) func(*licenseOption) { - return func(o *licenseOption) { o.product = name } +func PROGRAM_NAME(name string) { + APPNAME = name }