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 }