air
air copied to clipboard
Selecting which binary to run with air
Given that I have multiple binaries in /cmd (let's call them service1, service2), what's the proper way to select which service I want to run?
Ideally I want to achieve something like:
air service1 -> runs service1
air service2 -> runs service2
How I understand the question/case is a use case for:
-
project/cmd/service1/ -
project/cmd/service2/
Would it make sense for you to use separate configs for each cmd/service ?
-
.air_service1.toml -
.air_service2.toml
Then
- pass config with
air -c CONFIG_FILE(may wrap inmakecommands/targetsmake air-service1,make air-service2) - use
build/binorbuild/full_binoptions
links
- https://github.com/golang-standards/project-layout/tree/master/cmd
- https://github.com/cosmtrek/air/blob/master/air_example.toml