 ;; skips 'vendor' directories and sets GO15VENDOREXPERIMENT=1
 (setq flycheck-gometalinter-vendor t)
 ;; disable linters
-;(setq flycheck-gometalinter-disable-linters '("gotype" "gocyclo"))
+(setq flycheck-gometalinter-disable-linters '("vetshadow")) ; this is noisy with if err := blocks
 ;; Only enable selected linters
 ;(setq flycheck-gometalinter-disable-all t)
 ;(setq flycheck-gometalinter-enable-linters '("golint"))


  (setq ac-sources '(ac-source-go ac-source-yasnippet))

  ;(setq flycheck-checkers '(go-build gometalinter))
  )
(add-hook 'go-mode-hook 'my-go-mode-hook)

(provide 'init-go)

;; Only run the 'fast' linters
(setq flycheck-gometalinter-fast t)

(defun go-mode-setup ()
  (go-eldoc-setup)
  ;; Use goimports instead of go-fmt
  (setq gofmt-command "goreturns")
  ;; Call Gofmt before saving
  (add-hook 'before-save-hook 'gofmt-before-save)

