go-add-tags
go-add-tags copied to clipboard
Add field tags for struct fields
go-add-tags.el

Add field tags for struct fields. This package is inspired by GoAddTags of vim-go.
Screencast

Installation
go-add-tags is available on MELPA and MELPA stable
You can install go-add-tags with the following command.
M-x package-install [RET] go-add-tags [RET]
Interfaces
go-add-tags
Insert tag at current line. You can input multiple tags at once by comma, like json,yaml.
If region is enabled, then tags are inserted in lines in region. And current-prefix-key is specified,
then you can choose field style function.
Customization
go-add-tags-style(Default: 'snake-case)
How to convert field in tag from field name.
snake-caselower-camel-caseupper-camel-caseoriginal
Sample Configuration
(custom-set-variables
'(go-add-tags-style 'lower-camel-case))
(with-eval-after-load 'go-mode
(define-key go-mode-map (kbd "C-c t") #'go-add-tags))