I've command line tool which implemented with golang, which works OK. I want to execute some command that should provide list of strings
apps := $(shell fxt run apps)
apps:
@echo $(apps) is called
in the terminal I see the following while executing make
(which is totally fine)
[app1 app2] is called
Since the command fxt run apps
return array of string (var apps []string
)
My question is how can I loop over the apps
variable?
the data which is returned by the command is fine, but now I need to take this list (app1... appN) and loop over it, the issue which is not clear to me, how can I loop over array of strings?
special case is if in the list of theloop I got app7
how should do a fork in the code for example if(app7) prints mvn clean install
example.
for each app (in the app list) I need to run command
go test ./...
But for app7 in need to run
mvn clean install
and for app10
yarn