#+Begin_SRC go
package main
import ("fmt")
func main(){
fmt.Println("emacs")
}
#+End_Src
~/.emacs.d/init.el
:
(when (memq window-system '(mac ns))
(exec-path-from-shell-initialize)
(exec-path-from-shell-copy-env "GOPATH"))
;; Define function to call when go-mode loads
(defun my-go-mode-hook ()
(add-hook 'before-save-hook 'gofmt-before-save) ; gofmt before every save
(setq gofmt-command "goimports") ; gofmt uses invokes goimports
(if (not (string-match "go" compile-command)) ; set compile command default
(set (make-local-variable 'compile-command)
"go build -v && go test -v && go vet"))
;; guru settings
(go-guru-hl-identifier-mode) ; highlight identifiers
;; Key bindings specific to go-mode
(local-set-key (kbd "M-.") 'godef-jump) ; Go to definition
(local-set-key (kbd "M-*") 'pop-tag-mark) ; Return from whence you came
(local-set-key (kbd "M-p") 'compile) ; Invoke compiler
(local-set-key (kbd "M-P") 'recompile) ; Redo most recent compile cmd
(local-set-key (kbd "M-]") 'next-error) ; Go to next error (or msg)
(local-set-key (kbd "M-[") 'previous-error) ; Go to previous error or msg
(auto-complete-mode 1))
(add-hook 'go-mode-hook 'my-go-mode-hook)
(with-eval-after-load 'go-mode
(require 'go-autocomplete))
(require 'go-guru)
; i want use ob-go , above code just compile the code
;(require 'ob-go)
;(org-babel-do-load-languages
;'org-babel-load-languages
;'((go . t)))
But this is not execute how i execute this block. I'm new in Literal Programming Please help me