before:
  hooks:
  - go mod download
builds:
- <<: &build_defaults
    ldflags:
      - -s -w
  env:
    - CGO_ENABLED=0
  goos:
    - linux
    - darwin
    - windows
  goarch:
    - 386
    - amd64
    - arm
    - arm64
  ignore:
    - goos: windows
      goarch: arm64
archives:
  -
    name_template: >-
      {{ .ProjectName }}_
      {{- title .Os }}_
      {{- if eq .Arch "amd64" }}x86_64
      {{- else if eq .Arch "386" }}i386
      {{- else }}{{ .Arch }}{{ end }}
    format_overrides:
      -
        goos: windows
        format: zip
