Skip to content

Commit 6ec0a5a

Browse files
authored
Merge pull request #415 from IBM-Cloud/feat/add-config-alpha-cmd
feat: added AlphaCommandsEnabled configuration
2 parents 9a70219 + 31eef4c commit 6ec0a5a

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

bluemix/configuration/core_config/bx_config.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ type BXConfigData struct {
5252
LastSessionUpdateTime int64
5353
Trace string
5454
ColorEnabled string
55+
AlphaCommandsEnabled string
5556
HTTPTimeout int
5657
TypeOfSSO string
5758
FallbackIAMTokens struct {
@@ -415,6 +416,13 @@ func (c *bxConfig) ColorEnabled() (enabled string) {
415416
return
416417
}
417418

419+
func (c *bxConfig) AlphaCommandsEnabled() (enabled string) {
420+
c.read(func() {
421+
enabled = c.data.AlphaCommandsEnabled
422+
})
423+
return
424+
}
425+
418426
func (c *bxConfig) TypeOfSSO() (style string) {
419427
c.read(func() {
420428
style = c.data.TypeOfSSO
@@ -723,6 +731,12 @@ func (c *bxConfig) SetColorEnabled(enabled string) {
723731
})
724732
}
725733

734+
func (c *bxConfig) SetAlphaCommandsEnabled(enabled string) {
735+
c.write(func() {
736+
c.data.AlphaCommandsEnabled = enabled
737+
})
738+
}
739+
726740
func (c *bxConfig) SetLocale(locale string) {
727741
c.write(func() {
728742
c.data.Locale = locale

bluemix/configuration/core_config/repository.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ type Repository interface {
5252
PluginRepo(string) (models.PluginRepo, bool)
5353
IsSSLDisabled() bool
5454
TypeOfSSO() string
55+
AlphaCommandsEnabled() string
5556
AssumedTrustedProfileId() string
5657
FallbackIAMToken() string
5758
FallbackIAMRefreshToken() string
@@ -118,6 +119,7 @@ type Repository interface {
118119
SetLocale(string)
119120
SetTrace(string)
120121
SetColorEnabled(string)
122+
SetAlphaCommandsEnabled(string)
121123

122124
CheckMessageOfTheDay() bool
123125
SetMessageOfTheDayTime()

0 commit comments

Comments
 (0)