github.com/bilpay-tech/air@v0.0.0-20230514155040-b55f770a4ac6/air_example.toml (about)

     1  # Config file for [Air](https://github.com/bilpay-tech/air) in TOML format
     2  
     3  # Working directory
     4  # . or absolute path, please note that the directories following must be under root.
     5  root = "."
     6  tmp_dir = "tmp"
     7  
     8  [build]
     9  # Just plain old shell command. You could use `make` as well.
    10  cmd = "go build -o ./tmp/main ."
    11  # Binary file yields from `cmd`.
    12  bin = "tmp/main"
    13  # Customize binary, can setup environment variables when run your app.
    14  full_bin = "APP_ENV=dev APP_USER=air ./tmp/main"
    15  # Watch these filename extensions.
    16  include_ext = ["go", "tpl", "tmpl", "html"]
    17  # Ignore these filename extensions or directories.
    18  exclude_dir = ["assets", "tmp", "vendor", "frontend/node_modules"]
    19  # Watch these directories if you specified.
    20  include_dir = []
    21  # Watch these files.
    22  include_file = []
    23  # Exclude files.
    24  exclude_file = []
    25  # Exclude specific regular expressions.
    26  exclude_regex = ["_test\\.go"]
    27  # Exclude unchanged files.
    28  exclude_unchanged = true
    29  # Follow symlink for directories
    30  follow_symlink = true
    31  # This log file places in your tmp_dir.
    32  log = "air.log"
    33  # Poll files for changes instead of using fsnotify.
    34  poll = false
    35  # Poll interval (defaults to the minimum interval of 500ms).
    36  poll_interval = 500 # ms
    37  # It's not necessary to trigger build each time file changes if it's too frequent.
    38  delay = 0 # ms
    39  # Stop running old binary when build errors occur.
    40  stop_on_error = true
    41  # Send Interrupt signal before killing process (windows does not support this feature)
    42  send_interrupt = false
    43  # Delay after sending Interrupt signal
    44  kill_delay = 500 # ms
    45  # Rerun binary or not
    46  rerun = false
    47  # Delay after each executions
    48  rerun_delay = 500
    49  # Add additional arguments when running binary (bin/full_bin). Will run './tmp/main hello world'.
    50  args_bin = ["hello", "world"]
    51  
    52  [log]
    53  # Show log time
    54  time = false
    55  # Only show main log (silences watcher, build, runner)
    56  main_only = false
    57  
    58  [color]
    59  # Customize each part's color. If no color found, use the raw app log.
    60  main = "magenta"
    61  watcher = "cyan"
    62  build = "yellow"
    63  runner = "green"
    64  
    65  [misc]
    66  # Delete tmp directory on exit
    67  clean_on_exit = true