github.com/fairyhunter13/air@v1.40.5/air_example.toml (about)

     1  # Config file for [Air](https://github.com/fairyhunter13/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  [polling]
     9  enabled = false
    10  interval = "3s"
    11  
    12  [build]
    13  # Just plain old shell command. You could use `make` as well.
    14  cmd = "go build -o ./tmp/main ."
    15  # Binary file yields from `cmd`.
    16  bin = "tmp/main"
    17  # Customize binary, can setup environment variables when run your app.
    18  full_bin = "APP_ENV=dev APP_USER=air ./tmp/main"
    19  # Watch these filename extensions.
    20  include_ext = ["go", "tpl", "tmpl", "html"]
    21  # Ignore these filename extensions or directories.
    22  exclude_dir = ["assets", "tmp", "vendor", "frontend/node_modules"]
    23  # Watch these directories if you specified.
    24  include_dir = []
    25  # Exclude files.
    26  exclude_file = []
    27  # Exclude specific regular expressions.
    28  exclude_regex = ["_test\\.go"]
    29  # Exclude unchanged files.
    30  exclude_unchanged = true
    31  # Follow symlink for directories
    32  follow_symlink = true
    33  # This log file places in your tmp_dir.
    34  log = "air.log"
    35  # It's not necessary to trigger build each time file changes if it's too frequent.
    36  delay = 1000 # ms
    37  # Stop running old binary when build errors occur.
    38  stop_on_error = true
    39  # Send Interrupt signal before killing process (windows does not support this feature)
    40  send_interrupt = false
    41  # Delay after sending Interrupt signal
    42  kill_delay = 500 # ms
    43  # Add additional arguments when running binary (bin/full_bin). Will run './tmp/main hello world'.
    44  args_bin = ["hello", "world"]
    45  
    46  [log]
    47  # Show log time
    48  time = false
    49  
    50  [color]
    51  # Customize each part's color. If no color found, use the raw app log.
    52  main = "magenta"
    53  watcher = "cyan"
    54  build = "yellow"
    55  runner = "green"
    56  
    57  [misc]
    58  # Delete tmp directory on exit
    59  clean_on_exit = true