Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Go一緒にいかが?
Search
Ryuji Iwata
December 23, 2014
Programming
0
77
Go一緒にいかが?
Let's start the Go.
Ryuji Iwata
December 23, 2014
Tweet
Share
More Decks by Ryuji Iwata
See All by Ryuji Iwata
私のプログラミング人生のご紹介
qt_luigi
0
170
Azure AI Foundryのご紹介
qt_luigi
1
570
私なりのAIのご紹介 [2024年版]
qt_luigi
1
220
Azure ComputingとGo
qt_luigi
1
200
Go入門ハンズオン [準備編]
qt_luigi
1
130
Go入門ハンズオン [基礎編]
qt_luigi
1
140
本日のMicrosoft Azure
qt_luigi
0
140
私のEbitengineの第一歩
qt_luigi
0
740
私のMicrosoft Azure 2023
qt_luigi
0
370
Other Decks in Programming
See All in Programming
ZJIT: The Ruby 4 JIT Compiler / Ruby Release 30th Anniversary Party
k0kubun
1
300
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
150
tparseでgo testの出力を見やすくする
utgwkk
2
330
2年のAppleウォレットパス開発の振り返り
muno92
PRO
0
130
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
0
220
Kotlin Multiplatform Meetup - Compose Multiplatform 외부 의존성 아키텍처 설계부터 운영까지
wisemuji
0
150
CSC307 Lecture 03
javiergs
PRO
1
450
新卒エンジニアのプルリクエスト with AI駆動
fukunaga2025
0
240
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
560
LLM Çağında Backend Olmak: 10 Milyon Prompt'u Milisaniyede Sorgulamak
selcukusta
0
140
これならできる!個人開発のすゝめ
tinykitten
PRO
0
140
tsgolintはいかにしてtypescript-goの非公開APIを呼び出しているのか
syumai
7
2.4k
Featured
See All Featured
The Limits of Empathy - UXLibs8
cassininazir
1
200
Test your architecture with Archunit
thirion
1
2.1k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
65
35k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
0
1.1k
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.3k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
96
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
From π to Pie charts
rasagy
0
99
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.3k
The Curse of the Amulet
leimatthew05
0
6.5k
Transcript
Go一緒にいかが? GDG中国 - 第24回勉強会@岡山 2014.5.10
Who am I? package self import “introduction” const ( Name
= “Ryuji IWATA”, Twitter = “@qt_luigi”, Occupation = “Software Developer”)
おしながき ・Go言語とは? ・Goのセットアップ ・Goツールの紹介 ・Goの標準的な開発の流れ ・Goの文法の実例と解説
Go言語とは?
Go言語とは?(詳しくはWebへ!) ・コンパイル方式のプログラミング言語 ・2009年11月にオープンソースプロジェクト ・BSD, Linux, Mac OS X, Windows に対応
・Google App Engine (Experimental) にも対応 ・シンプルと速さ ・ガーベジコレクション ・クラスなし ・同時実行処理を実装しやすい
Goのセットアップ
ダウンロード 公式バイナリー http://code.google.com/p/go/wiki/Downloads 対応OS(Go 1.2.2 の場合) Linux 2.6.23 以降 (CentOS/RHEL
5.x 除く) Mac OS X 10.6 以降、FreeBSD 7 以降、 Windows 2000 以降 (2000 は Go 1.2 系まで) System requirements - http://golang.org/doc/install#requirements
インストール 標準のインストール先(= GOROOT) Windows:c:¥Go PC-UNIX:/usr/local/go ツール用にPATHを通す(= GOROOT/bin) Windows:c:¥Go¥bin PC-UNIX:/usr/local/go/bin Install
the Go tools - http://golang.org/doc/install#install tar -C /usr/local -xzf go1.2.2.linux-amd64.tar.gz
動作確認ファイル作成 テキストエディターにて「hello.go」ファイルをUTF-8 (BOMなし)で作成。 package main import “fmt” func main() {
fmt.Printf(“hello, world¥n”) }
セットアップ確認 「go run ファイル名」を実行して動作を確認。 ↑Goのプログラムをコンパイルして実行。 $ go run hello.go hello,
world
Goツールの紹介
go または go help goツールの機能や使い方を表示。 ~$ go Go is a
tool for managing Go source code. ... The commands are: build compile packages and dependencies clean remove object files env print Go environment information fix run go tool fix on packages ...
go env Goの環境情報を表示。 ~$ go env GOARCH="amd64" ... GOOS="darwin" GOPATH="/Users/ユーザー名/gocode"
... GOROOT="/usr/local/go" ...
go version Goのバージョンを表示。 詳細は「Goの標準的な開発の流れ」にて。 ~$ go version go version go1.2.2
darwin/amd64
go fmt ソースのフォーマットを整形。 ~$ vim pi.go package pi const(Pi=3.14) ~$
go fmt pi.go pi.go ~$ cat pi.go package pi const ( pi = 3.14 )
go get パッケージをダウンロードしてインストール。 GOPATHの設定が必要なので、実行する場 合は「Goの標準的な開発の流れ」の後で。 ~$ go get github.com/golang/lint ~$
ls $GOPATH/src/github.com/golang/lint LICENSE golint lint_test.go testdata README lint.go misc ~$ ls $GOPATH/pkg/darwin_amd64/github.com/golang/ lint.a
・Bitbucket (Git, Mercurial) ・GitHub (Git) ・Google Code Project Hosting (Git,
Mercurial, Subversion) ・Launchpad (Bazaar) Remote import paths - http://golang.org/cmd/go/#hdr-Remote_import_paths リモートリポジトリー
その他のGoツール go build, go install, go test 「Goの標準的な開発の流れ」内で紹介。 go clean,
go fix, go list, go tool, go vet 当方の理解不足や使用頻度から、今回は 割愛させて頂きましたm(__)m ちなみにgo cleanは実行するディレクトリーに よって削除対象のファイルが異なりますq@w@p
Goの標準的な開発の流れ
目的と内容 「Writing, building, installing, and testing Go code」を進めて、Goの標準的な開発の流れを学び ましょう! 使用する資料へのリンク
https://docs.google. com/document/d/1bh2GpXg4i81DrungtvoF6vowOeiaiQ MVbL0zhnvRgJA/pub
Goの文法の実例と解説
目的と内容 「Learn X in Y minutes」を進めて、Goの文法や実 例を学びましょう! 使用する資料へのリンク https://docs.google. com/document/d/1Y6xy40urFNf4lwFaOaXbwX8N-oA-
SQiRE7YAfBTC2sM/pub
Happy Hacking!