Support golang

I decided to start writing go code for scripts instead of python. I think this
will be a learning opportunity for me and should increase the integrity of my
scripts by adding some static type checking.
This commit is contained in:
William Carroll 2020-01-31 23:15:01 +00:00
parent 184404d542
commit e8b47d5030
2 changed files with 24 additions and 0 deletions

View file

@ -59,3 +59,4 @@
(require 'wpc-javascript)
(require 'wpc-java)
(require 'wpc-prolog)
(require 'wpc-golang)

View file

@ -0,0 +1,23 @@
;;; wpc-ocaml.el --- Tooling preferences for Go -*- lexical-binding: t -*-
;; Author: William Carroll <wpcarro@gmail.com>
;;; Commentary:
;; Tooling support for golang development.
;;; Code:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Configuration
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; I'm unsure if this belongs in wpc-golang.el because it's a generic setting,
;; but because go is the first languages I've encountered that enforces tab
;; usage (I think) I'm configuring it.
(setq-default tab-width 4)
(use-package go-mode
:config
(add-hook-before-save 'go-mode-hook #'gofmt-before-save))
(provide 'wpc-golang)
;;; wpc-ocaml.el ends here