Tag: Go/入門
port install go
;; go-mode (add-hook 'go-mode-hook '(lambda () (setq tab-width 4) ))
※ 「`flet' is an obsolete macro (as of 24.3); use either `cl-flet' or `cl-letf'.」という警告がでる場合、パッケージが古い?最新版をインストールしてみる。
package main import "fmt" func main() { fmt.Println("Hello, 世界") }
go run.hello.go
go build hello.go
go fmt hello.go
godoc fmt
godoc -http=":3000"
. ├── bin │ └── main ├── pkg └── src ├── github.com │ └── src256 │ └── gosample │ └── gosample.go └── main └── main.go
go get github.com/src256/gosample