@@ -7,11 +7,13 @@ import (
7
7
"os"
8
8
9
9
"github.com/rs/zerolog"
10
+ "github.com/snyk/error-catalog-golang-public/cli"
11
+ "github.com/spf13/pflag"
12
+ "golang.org/x/term"
13
+
10
14
"github.com/snyk/go-application-framework/pkg/configuration"
11
15
"github.com/snyk/go-application-framework/pkg/local_workflows/connectivity_check_extension/connectivity"
12
16
"github.com/snyk/go-application-framework/pkg/workflow"
13
- "github.com/spf13/pflag"
14
- "golang.org/x/term"
15
17
)
16
18
17
19
const (
@@ -33,6 +35,7 @@ func InitConnectivityCheckWorkflow(engine workflow.Engine) error {
33
35
config .Bool (noColorFlag , false , "Disable colored output" )
34
36
config .Int (timeoutFlag , 10 , "Timeout in seconds for each connection test" )
35
37
config .Int (maxOrgCountFlag , 100 , "Maximum number of organizations to retrieve" )
38
+ config .Bool (configuration .FLAG_EXPERIMENTAL , false , "This feature is experimental" )
36
39
37
40
_ , err := engine .Register (WORKFLOWID_CONNECTIVITY_CHECK , workflow .ConfigurationOptionsFromFlagset (config ), connectivityCheckEntryPoint )
38
41
return err
@@ -45,6 +48,10 @@ func connectivityCheckEntryPoint(invocationCtx workflow.InvocationContext, input
45
48
networkAccess := invocationCtx .GetNetworkAccess ()
46
49
ui := invocationCtx .GetUserInterface ()
47
50
51
+ if ! config .GetBool (configuration .FLAG_EXPERIMENTAL ) {
52
+ return nil , cli .NewCommandIsExperimentalError ("" )
53
+ }
54
+
48
55
checker := connectivity .NewChecker (networkAccess , logger , config , ui )
49
56
50
57
logger .Info ().Msg ("Starting Snyk connectivity check" )
0 commit comments