Skip to content

Commit 1f2409f

Browse files
committed
fix: print feature flags
1 parent 9f7a860 commit 1f2409f

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

api.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ func Initialize(baseCtx context.Context) context.Context {
7979
auth.InitializeAuth()
8080
jobs.InitializeJobs(ctx)
8181
validation.InitializeVirusTotal()
82+
util.PrintFeatureFlags()
8283

8384
return ctx
8485
}

util/flags.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
package util
22

3-
import "github.com/spf13/viper"
3+
import (
4+
"github.com/rs/zerolog/log"
5+
"github.com/spf13/viper"
6+
)
47

58
type FeatureFlag string
69

@@ -11,3 +14,9 @@ const (
1114
func FlagEnabled(flag FeatureFlag) bool {
1215
return viper.GetBool("feature_flags." + string(flag))
1316
}
17+
18+
func PrintFeatureFlags() {
19+
for _, flag := range []FeatureFlag{FeatureFlagAllowMultiTargetUpload} {
20+
log.Info().Str("flag", string(flag)).Bool("enabled", FlagEnabled(flag)).Msg("flag")
21+
}
22+
}

0 commit comments

Comments
 (0)