Skip to content

Commit 4a07f47

Browse files
authored
Add nexus commands. (#347)
* Add nexus commands.
1 parent 11a13cd commit 4a07f47

10 files changed

Lines changed: 18691 additions & 6838 deletions

File tree

app/app.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ func NewApp(params AppParams) (*cli.App, error) {
3636
if IsFeatureEnabled(ServiceAccountFeatureFlag) {
3737
commands = append(commands, command)
3838
}
39+
} else if command.Name == "nexus" {
40+
if IsFeatureEnabled(NexusFeatureFlag) {
41+
commands = append(commands, command)
42+
}
3943
} else {
4044
commands = append(commands, command)
4145
}

app/feature.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ import (
1313
var (
1414
GCPSinkFeatureFlag = "enable-gcp-sink"
1515
ServiceAccountFeatureFlag = "enable-service-account"
16+
NexusFeatureFlag = "enable-nexus"
1617
featureflagFileName = "feature.json"
1718
)
1819

19-
var supportFeatureFlags = []string{GCPSinkFeatureFlag, ServiceAccountFeatureFlag}
20+
var supportFeatureFlags = []string{GCPSinkFeatureFlag, ServiceAccountFeatureFlag, NexusFeatureFlag}
2021

2122
type FeatureFlag struct {
2223
Name string `json:"Name"`
@@ -141,6 +142,14 @@ func NewFeatureCommand() (CommandOut, error) {
141142
return toggleFeature(ServiceAccountFeatureFlag)
142143
},
143144
},
145+
{
146+
Name: "toggle-nexus",
147+
Aliases: []string{"tnxs"},
148+
Usage: "switch nexus on/off",
149+
Action: func(c *cli.Context) error {
150+
return toggleFeature(NexusFeatureFlag)
151+
},
152+
},
144153
{
145154
Name: "get",
146155
Aliases: []string{"g"},

0 commit comments

Comments
 (0)