Skip to content

Latest commit

 

History

History
15 lines (12 loc) · 394 Bytes

File metadata and controls

15 lines (12 loc) · 394 Bytes

structify

Transform JSON to Go structs

Emacs Config

(defun go-json-structify (beg end)
  "Transform JSON in the selected region to Go Structs."
  (interactive "*r")
  (if (region-active-p)
      (shell-command-on-region beg end "structify" (current-buffer) t)
    (message "No active region")))

(local-set-key (kbd "C-x C-j") 'go-json-structify) ; Structify json in region