MCPcopy Index your code
hub / github.com/cortexlabs/cortex / cmdPrintConfig

Function cmdPrintConfig

cli/cmd/cluster.go:866–884  ·  view source on GitHub ↗
(awsClient *awslib.Client, accessConfig *clusterconfig.AccessConfig, outputType flags.OutputType)

Source from the content-addressed store, hash-verified

864}
865
866func cmdPrintConfig(awsClient *awslib.Client, accessConfig *clusterconfig.AccessConfig, outputType flags.OutputType) {
867 clusterConfig := refreshCachedClusterConfig(awsClient, accessConfig, outputType == flags.PrettyOutputType)
868
869 infoInterface := clusterConfig.CoreConfig
870
871 if outputType == flags.JSONOutputType {
872 outputBytes, err := libjson.Marshal(infoInterface)
873 if err != nil {
874 exit.Error(err)
875 }
876 fmt.Println(string(outputBytes))
877 } else {
878 outputBytes, err := yaml.Marshal(infoInterface)
879 if err != nil {
880 exit.Error(err)
881 }
882 fmt.Println(string(outputBytes))
883 }
884}
885
886func cmdInfo(awsClient *awslib.Client, accessConfig *clusterconfig.AccessConfig, stacks clusterstate.ClusterStacks, outputType flags.OutputType, disallowPrompt bool) {
887 clusterConfig := refreshCachedClusterConfig(awsClient, accessConfig, outputType == flags.PrettyOutputType)

Callers 1

cluster.goFile · 0.85

Calls 2

ErrorFunction · 0.92

Tested by

no test coverage detected