+func GetID(ctx *cli.Context, idEnvVarName string) string {
+ return GetIDName(ctx, "id", idEnvVarName)
+}
+
+// GetIDName Return a string ID set with --XXX option or as simple parameter
+func GetIDName(ctx *cli.Context, idName, idEnvVarName string) string {
+ if idName == "" {
+ return ""
+ }
+
+ // Get id set using option --id
+ id := ctx.String(idName)
+
+ // Check if id has been set using env variable
+ envSdkid, _ := os.LookupEnv(idEnvVarName)
+
+ // Support as 1st arg without --id option string (for example xds-cli sdk install 123456)