From 4a4057bfa36cb3585bb0946ae14d2a1b1a544f61 Mon Sep 17 00:00:00 2001 From: mvh Date: Tue, 2 May 2023 01:44:59 +0200 Subject: [PATCH] Add readme --- README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 08b9c9e..0700556 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,15 @@ # structify -Transform JSON to Go structs \ No newline at end of file +Transform JSON to Go structs + +## Emacs Config +```elisp +(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 +```