Skip to Content
初めてのGo言語 第2版 ―他言語プログラマーのためのイディオマティックGo実践ガイド
book

初めてのGo言語 第2版 ―他言語プログラマーのためのイディオマティックGo実践ガイド

by Jon Bodner, 武舎 広幸
August 2025
Beginner to intermediate
552 pages
7h 58m
Japanese
O'Reilly Japan, Inc.
Content preview from 初めてのGo言語 第2版 ―他言語プログラマーのためのイディオマティックGo実践ガイド

11章各種ツール

プログラミング言語は「孤立した存在」ではありません。その言語が有用であるためには、開発を支援するツールが欠かせません。当然ですが、Go言語にも開発中にさまざまな場面で役に立つ各種のツールが用意されています。今日のソフトウェアエンジニアが直面している問題に対処し、高品質のソフトウェアの構築を支援することを目的として比較的最近開発された言語ですから、ほかの言語の開発環境では難しくなりがちな作業を簡素化してくれるツールが揃っています。

この章では、サードパーティーから提供されているものを含め、Go言語による開発を快適なものにするための補助的なツールについて解説します。なお言語にバンドルされている次のツールについては、すでに説明しましたので該当する章を参照してください。

  • go vetおよびgo fmt——1章
  • go modおよびgo build——10章1章でも簡単に触れています)
  • go getgo listgo workgo doc——10章

またgo testについては「15章 テスト」で詳しく説明します。

11.1 go run——短いプログラムの実行

Goはコンパイル言語ですから、実行可能ファイルに変換してから実行する必要があります。PythonやJavaScriptなどのインタプリタ言語では、簡単なスクリプトを書いてすぐに実行できますが、Goの場合はそうはいきません。しかし、go runコマンドを実行すればインタプリタを使うのと(ほぼ)同じように簡単に実行できます。

1章 Go環境のセットアップ」の最初のプログラムをgo runを使って実行してみましょう。

まず、hello.goという名前で同じ内容のファイルを作ってください(ch11/hello.go ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

データ保護完全ガイド ―あらゆるデータの保全と回復を可能にする

データ保護完全ガイド ―あらゆるデータの保全と回復を可能にする

W. Curtis Preston, 佐野 泰之, 池田 祥孝

Publisher Resources

ISBN: 9784814401192Publisher Website