Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

[インデックス 17505] ファイルの概要

このコミットは、Go言語のバージョン1.2のリリースノートの初期ドラフトをHTML形式で導入し、同時に以前のテキスト形式のドラフトを削除するものです。これにより、Go 1.2の公式ドキュメントの基盤が構築され、今後のリリースノート作成プロセスがHTMLベースに一本化されます。

コミット

commit 5863b7d2ce6679ec94a801bad342a06254700e2a
Author: Rob Pike <r@golang.org>
Date:   Mon Sep 9 13:29:08 2013 +1000

    doc/go1.2.html: first cut
    Lay out the doc and write text for the minor changes.
    (I left the net ones for someone who understands them better,
    or for someone to describe them to me better so I can write them.)
    Much still to do.
    
    Delete go1.2.txt so there's only one thing to update.
    
    R=golang-dev, adg
    CC=golang-dev
    https://golang.org/cl/13597044

GitHub上でのコミットページへのリンク

https://github.com/golang/go/commit/5863b7d2ce6679ec94a801bad342a06254700e2a

元コミット内容

このコミットは、doc/go1.2.html という新しいファイルを導入し、Go 1.2のリリースノートの初期レイアウトと一部のマイナーな変更点に関するテキストを含んでいます。ネットワーク関連の変更点については、より詳しい知識を持つ人物による記述を待つ旨がコメントされています。また、更新対象を一本化するために go1.2.txt ファイルが削除されています。

変更の背景

Go言語は、バージョン1.0以降、安定したリリースサイクルと後方互換性の維持を重視しています。各メジャーリリース(例: Go 1.1, Go 1.2)では、言語仕様の変更、標準ライブラリの改善、ツールチェーンの強化、パフォーマンスの向上など、多岐にわたる変更が加えられます。これらの変更点をユーザーに正確かつ網羅的に伝えるために、詳細なリリースノートが作成されます。

このコミットの背景には、Go 1.2のリリースに向けて、公式リリースノートの作成プロセスを開始するという目的があります。以前はテキストファイル (go1.2.txt) でドラフトが管理されていましたが、よりリッチな表現力とGoのドキュメントシステムとの統合を考慮し、HTML形式 (go1.2.html) への移行が決定されました。これにより、リリースノートの見た目の改善だけでなく、将来的なメンテナンス性やGoのウェブサイトへの統合が容易になります。

コミットメッセージにある「Delete go1.2.txt so there's only one thing to update.」という記述は、ドキュメントの二重管理を避け、更新作業の効率化を図る意図を明確に示しています。

前提知識の解説

Go言語のリリースサイクルと互換性保証 (Go 1 Compatibility Promise)

Go言語は、Go 1.0のリリース以降、「Go 1 Compatibility Promise」という厳格な後方互換性ポリシーを掲げています。これは、Go 1.0で書かれたプログラムは、将来のGoのバージョンでも変更なしにコンパイル・実行できることを保証するものです。このポリシーにより、Goユーザーは安心して新しいバージョンにアップグレードでき、エコシステムの安定性が保たれています。リリースノートは、この互換性保証の範囲内でどのような変更が行われたかをユーザーに伝える重要な役割を担っています。

リリースノートの重要性

ソフトウェアのリリースノートは、新しいバージョンで導入された変更点、新機能、バグ修正、非推奨になった機能、既知の問題などをユーザーに伝えるための公式文書です。開発者にとっては、変更の意図や技術的詳細を説明する場であり、ユーザーにとっては、アップグレードの判断や新しい機能の利用方法を理解するための手引きとなります。特にGoのような後方互換性を重視する言語では、互換性を損なう可能性のある変更(非常に稀ですが)や、パフォーマンス改善などの恩恵を明確に伝えることが不可欠です。

HTMLとテキスト形式のドキュメントの比較

  • テキスト形式 (.txt): シンプルで汎用性が高く、どの環境でも容易に閲覧できます。しかし、書式設定(太字、斜体、リスト、リンクなど)の表現力が乏しく、視覚的な情報の整理が難しいという欠点があります。
  • HTML形式 (.html): Webブラウザで表示されることを前提としたマークアップ言語であり、豊富な書式設定、画像埋め込み、ハイパーリンクなど、視覚的に豊かで構造化されたドキュメントを作成できます。Goの公式ドキュメントはHTMLで提供されており、リリースノートもこれに準拠することで、一貫したユーザー体験を提供できます。

GoのCL (Change List)

Goプロジェクトでは、コードの変更は「Change List (CL)」という単位で管理されます。これは、Gitのコミットに相当する概念ですが、GoのコードレビューシステムであるGerritと密接に連携しています。各CLには一意の番号が割り当てられ、コードの変更内容、レビューの履歴、関連する議論などが記録されます。コミットメッセージに記載されている https://golang.org/cl/13597044 は、このコミットに対応するGerritのCLへのリンクを示しています。

技術的詳細

このコミットの主要な技術的変更は、Go 1.2リリースノートのフォーマットをテキストからHTMLへ移行する点に集約されます。

doc/go1.2.html の新規作成

新しく追加された doc/go1.2.html ファイルは、Goの公式ドキュメントサイトで利用されるHTMLテンプレートの構造に従っています。ファイルの冒頭には、以下のような特殊なコメントブロックが含まれています。

<!--{
	"Title": "Go 1.2 Release Notes",
	"Path":  "/doc/go1.2",
	"Template": true
}-->

このブロックは、Goのドキュメント生成システムがHTMLファイルを処理する際にメタデータとして利用されます。

  • "Title": ページのタイトルを定義します。
  • "Path": ドキュメントサイト上でのURLパスを定義します。
  • "Template": このファイルがGoの標準ドキュメントテンプレートを使用してレンダリングされることを示します。

ファイルの内容は、Go 1.1のリリースノート (go1.1.html) からのプレースホルダーテキストを多く含んでいます。特に、<font color=red> タグで囲まれた部分は、Go 1.1のドキュメントからの引用であり、Go 1.2の具体的な内容に更新されるべき箇所としてマークされています。これは、新しいリリースノートの作成において、既存の構造やスタイルを再利用しつつ、変更点を効率的に記述するための一般的なアプローチです。

HTMLファイルには、Go 1.2で導入される予定の主要な変更点のセクション見出しが既に含まれています。これには、以下のような項目が含まれます。

  • Introduction to Go 1.2: リリース全体の概要。
  • Changes to the language: 言語仕様の変更点。
    • Three-index slices: スライス操作の拡張。
  • Changes to the implementations and tools: 実装とツールの変更点。
    • runtime: preemption of goroutines at function entry: ゴルーチンのプリエンプション(Go 1.2の重要な変更点の一つ)。
    • go/build: support including C++ code with cgo: cgoでのC++コードのサポート。
    • gccgo: gccgoのステータス。
    • Changes to the go command: go コマンドの変更点(例: テストカバレッジ、go get -tgo doc の削除)。
  • Additional platforms: 新たにサポートされるプラットフォーム。
  • Performance: パフォーマンスの改善点。
    • compress/bzip2, crypto/des, encoding/json, net など、具体的なパッケージでのパフォーマンス向上。
  • Changes to the standard library: 標準ライブラリの変更点。
    • bufio.Scanner: 新しいスキャナー型。
    • archive/tar, archive/zip: 破壊的変更。
    • fmt: Printf などでの引数のインデックスアクセス。
    • encoding: 汎用エンコーディングインターフェース。
    • sync/atomic: Swap 関数。
    • text/template: 比較関数、{{else if ...}}
    • exp および old サブツリーの移動。
    • New packages: 新しいパッケージ(例: go/format)。
    • Minor changes to the library: その他のマイナーなライブラリ変更(archive/zip, bufio, compress/bzip2, compress/flate, compress/gzip, container/heap, container/list, crypto/cipher, crypto/md5, crypto/sha1, crypto/sha256, crypto/sha512, crypto/x509, crypto/tls, database/sql, encoding/csv, encoding/gob, encoding/json, encoding/xml, flag, go/build, image/draw, image/gif, io, net, net/http, runtime, sort, strings, syscall, testing, text/template, time, unicode)。

これらの項目は、Go 1.2で予定されている広範な変更の初期リストを示しており、リリースノートの作成者がこれらのセクションを埋めていくことを意図しています。

doc/go1.2.txt の削除

doc/go1.2.txt は、Go 1.1リリース以降の変更点を記録するためのテキストファイルでした。このファイルは、Go 1.2のリリースノートのドラフトとして機能していましたが、HTML形式への移行に伴い不要となりました。このファイルの削除は、リリースノートの情報を一元化し、将来的なメンテナンスの負担を軽減するための措置です。

コアとなるコードの変更箇所

--- /dev/null
+++ b/doc/go1.2.html
@@ -0,0 +1,577 @@
+<!--{
+\t"Title": "Go 1.2 Release Notes",
+\t"Path":  "/doc/go1.2",
+\t"Template": true
+}-->
+
+<h2 id="introduction">Introduction to Go 1.2</h2>
+
+<p>
+RED TEXT IS FROM THE 1.1 DOC AND NEEDS TO BE UPDATED. (It is here for
+formatting and style reference.)
+<p>
+<font color=red>
+The release of <a href="/doc/go1.html">Go version 1</a> (Go 1 or Go 1.0 for short)
+in March of 2012 introduced a new period
+of stability in the Go language and libraries.
+That stability has helped nourish a growing community of Go users
+and systems around the world.
+Several "point" releases since
+then—1.0.1, 1.0.2, and 1.0.3—have been issued.
+These point releases fixed known bugs but made
+no non-critical changes to the implementation.
+</font>
+</p>
+
+<p>
+<font color=red>
+This new release, Go 1.1, keeps the <a href="/doc/go1compat.html">promise
+of compatibility</a> but adds a couple of significant
+(backwards-compatible, of course) language changes, has a long list
+of (again, compatible) library changes, and
+includes major work on the implementation of the compilers,
+libraries, and run-time.
+The focus is on performance.
+Benchmarking is an inexact science at best, but we see significant,
+sometimes dramatic speedups for many of our test programs.
+We trust that many of our users' programs will also see improvements
+just by updating their Go installation and recompiling.
+</font>
+</p>
+
+<p>
+<font color=red>
+This document summarizes the changes between Go 1 and Go 1.2.
+Very little if any code will need modification to run with Go 1.1,
+although a couple of rare error cases surface with this release
+and need to be addressed if they arise.
+Details appear below; see the discussion of XXX.
+</font>
+</p>
+
+<h2 id="language">Changes to the language</h2>
+
+<p>
+<font color=red>
+<a href="/doc/go1compat.html">The Go compatibility document</a> promises
+that programs written to the Go 1 language specification will continue to operate,
+and those promises are maintained.
+In the interest of firming up the specification, though, there are
+details about some error cases that have been clarified.
+There are also some new language features.
+</font>
+</p>
+
+<h3 id="threeindex">Three-index slices</h3>
+
+<p>
+cmd/gc: three-index slicing to set cap as well as length (CL 10743046).
+</p>
+
+
+<h2 id="impl">Changes to the implementations and tools</h2>
+
+<ul>
+<li>
+runtime: preemption of goroutines at function entry (CL 12371043).
+</li>
+
+<li>
+go/build: support including C++ code with cgo (CL 8248043).
+</li>
+</ul>
+
+<h3 id="gccgo">Status of gccgo</h3>
+
+<p>
+<font color=red>
+The GCC release schedule does not coincide with the Go release schedule, so some skew is inevitable in
+<code>gccgo</code>'s releases.
+The 4.8.0 version of GCC shipped in March, 2013 and includes a nearly-Go 1.1 version of <code>gccgo</code>.
+Its library is a little behind the release, but the biggest difference is that method values are not implemented.
+Sometime around July 2013, we expect 4.8.2 of GCC to ship with a <code>gccgo</code>
+providing a complete Go 1.1 implementaiton.
+</font>
+</p>
+
+<h3 id="gc_changes">TODO</h3>
+
+<p>
+TODO: write prose
+</p>
+
+<ul>
+<li>cmd/5a: removed support for R9/R10 (use m/g instead) (CL 9840043).
+</li>
+
+<li>cmd/5l: add MOVBS, MOVHS etc for sub-word moves (CL 12682043).
+</li>
+
+<li>cmd/5l: support for external linking for linux/arm (CL 12871044).
+</li>
+
+<li>cmd/cgo, cmd/go: support including C++ code with cgo (CL 8248043).
+</li>
+
+<li>cmd/gc: make missing package error fatal (CL 12677043).
+</li>
+</ul>
+
+<h3 id="gocmd">Changes to the go command</h3>
+
+<ul>
+<li>cmd/go: test coverage (CL 10413044).
+</li>
+
+<li>cmd/go: add -t flag to 'go get' to download test dependencies (CL 12566046).
+</li>
+
+<li>cmd/go: delete 'go doc' (CL 12974043).
+</li>
+
+</ul>
+
+
+<h3 id="platforms">Additional platforms</h3>
+
+<p>
+<font color=red>
+The Go 1.1 tool chain adds experimental support for <code>freebsd/arm</code>,
+<code>netbsd/386</code>, <code>netbsd/amd64</code>, <code>netbsd/arm</code>,
+<code>openbsd/386</code> and <code>openbsd/amd64</code> platforms.
+</font>
+</p>
+
+<p>
+<font color=red>
+An ARMv6 or later processor is required for <code>freebsd/arm</code> or
+<code>netbsd/arm</code>.
+</font>
+</p>
+
+<p>
+<font color=red>
+Go 1.1 adds experimental support for <code>cgo</code> on <code>linux/arm</code>.
+</font>
+</p>
+
+<h2 id="performance">Performance</h2>
+
+<p>
+<font color=red>
+The performance of code compiled with the Go 1.1 gc tool suite should be noticeably
+better for most Go programs.
+Typical improvements relative to Go 1.0 seem to be about 30%-40%, sometimes
+much more, but occasionally less or even non-existent.
+There are too many small performance-driven tweaks through the tools and libraries
+to list them all here, but the following major changes are worth noting:
+</font>
+</p>
+
+<ul>
+<li>compress/bzip2: faster decompression by 30% (CL 9915043).
+</li>
+
+<li>crypto/des: 5x faster encoding/decoding (CL 11874043, 12072045).
+</li>
+
+<li>encoding/json: faster encoding (CL 9129044).
+</li>
+
+<li>net: improve windows performance by up to 30% (CL 8670044).
+</li>
+
+<li>net: improve performance on BSD by up to 30% (CL 8264043, 12927048, 13080043).
+</li>
+</ul>
+
+<h2 id="library">Changes to the standard library</h2>
+
+<h3 id="foo_bar">foo.Bar</h3>
+
+<p>
+TODO: choose which to call out
+<font color=red>
+The various routines to scan textual input in the
+<a href="/pkg/bufio/"><code>bufio</code></a>
+package,
+<a href="/pkg/bufio/#Reader.ReadBytes"><code>ReadBytes</code></a>,
+<a href="/pkg/bufio/#Reader.ReadString"><code>ReadString</code></a>
+and particularly
+<a href="/pkg/bufio/#Reader.ReadLine"><code>ReadLine</code></a>,
+are needlessly complex to use for simple purposes.
+In Go 1.1, a new type,
+<a href="/pkg/bufio/#Scanner"><code>Scanner</code></a>,
+has been added to make it easier to do simple tasks such as
+read the input as a sequence of lines or space-delimited words.
+It simplifies the problem by terminating the scan on problematic
+input such as pathologically long lines, and having a simple
+default: line-oriented input, with each line stripped of its terminator.
+Here is code to reproduce the input a line at a time:
+</font>
+
+<p>
+<font color=red>
+<em>Updating</em>:
+To correct breakage caused by the new struct field,
+<code>go fix</code> will rewrite code to add tags for these types.
+More generally, <code>go vet</code> will identify composite literals that
+should be revised to use field tags.
+</font>
+</p>
+
+<ul>
+
+<li>
+Breaking change:
+archive/tar,archive/zip: fix os.FileInfo implementation to provide base name only (CL 13118043).
+</li>
+
+<li>
+fmt: indexed access to arguments in Printf etc. (CL 9680043).
+</li>
+
+<li>
+encoding: new package defining generic encoding interfaces (CL 12541051).
+</li>
+
+<li>
+sync/atomic: add Swap functions (CL 12670045).
+</li>
+<li>
+text/template: add comparison functions (CL 13091045).
+</li>
+
+<li>
+text/template: allow {{\"{{\"}}else if ... {{\"}}\"}} to simplify if chains (CL 13327043).
+</li>
+</ul>
+
+<h3 id="exp_old">Exp and old subtrees moved to go.exp and go.text subrepositories</h3>
+
+<p>
+<font color=red>
+To make it easier for binary distributions to access them if desired, the <code>exp</code>
+and <code>old</code> source subtrees, which are not included in binary distributions,
+have been moved to the new <code>go.exp</code> subrepository at
+<code>code.google.com/p/go.exp</code>. To access the <code>ssa</code> package,
+for example, run
+</font>
+</p>
+
+<h3 id="new_packages">New packages</h3>
+
+<p>
+<font color=red>
+There are three new packages.
+</font>
+</p>
+
+<ul>
+<li>
+<font color=red>
+The <a href="/pkg/go/format/"><code>go/format</code></a> package provides
+a convenient way for a program to access the formatting capabilities of the
+<a href="/cmd/go/#hdr-Run_gofmt_on_package_sources"><code>go fmt</code></a> command.
+It has two functions,
+<a href="/pkg/go/format/#Node"><code>Node</code></a> to format a Go parser
+<a href="/pkg/go/ast/#Node"><code>Node</code></a>,
+and
+<a href="/pkg/go/format/#Source"><code>Source</code></a>
+to reformat arbitrary Go source code into the standard format as provided by the
+<a href="/cmd/go/#hdr-Run_gofmt_on_package_sources"><code>go fmt</code></a> command.
+</font>
+</li>
+</ul>
+
+<h3 id="minor_library_changes">Minor changes to the library</h3>
+
+<p>
+The following list summarizes a number of minor changes to the library, mostly additions.
+See the relevant package documentation for more information about each change.
+</p>
+
+<ul>
+
+<li>
+The <a href="/pkg/archive/zip/"><code>archive/zip</code></a> package
+adds the
+<a href="/pkg/archive/zip/#File.DataOffset"><code>DataOffset</code></a> accessor
+to return the offset of a file's (possibly compressed) data within the archive.
+</li>
+
+<li>
+The <a href="/pkg/bufio/"><code>bufio</code></a> package
+adds <a href="/pkg/bufio/#Reader.Reset"><code>Reset</code></a>
+methods to <a href="/pkg/bufio/#Reader"><code>Reader</code></a> and
+<a href="/pkg/bufio/#Writer"><code>Writer</code></a>.
+These methods allow the <a href="/pkg/Reader/"><code>Readers</code></a>
+and <a href="/pkg/Writer/"><code>Writers</code></a>
+to be re-used on new input and output readers and writers, saving
+allocation overhead. 
+</li>
+
+<li>
+The <a href="/pkg/compress/bzip2/"><code>compress/bzip2</code></a>
+can now decompress concatenated archives.
+</li>
+
+<li>
+The <a href="/pkg/compress/flate/"><code>compress/flate</code></a>
+package adds a <a href="/pkg/compress/flate/#Reset"><code>Reset</code></a> 
+method on the <a href="/pkg/compress/flate/#Writer"><code>Writer</code></a>,
+allowing compression of one file to start with another's dictionary.
+</li>
+
+<li>
+compress/gzip: add Reset method on Writer (CL 13435043).
+</li>
+
+<li>
+The <a href="/pkg/container/heap/"><code>container/heap</code></a> package
+adds a <a href="/pkg/container/heap/#Fix"><code>Fix</code></a>
+method to provide a more efficient way to update an item's position in the heap.
+</li>
+
+<li>
+The <a href="/pkg/container/list/"><code>container/list</code></a> package
+adds the <a href="/pkg/container/list/#MoveBefore"><code>MoveBefore</code></a>
+and
+<a href="/pkg/container/list/#MoveAfter"><code>MoveAfter</code></a>
+methods, which implement the obvious rearrangement.
+</li>
+
+<li>
+The <a href="/pkg/crypto/cipher/"><code>crypto/cipher</code></a> package
+adds the a new GCM mode (Galois Counter Mode), which is almost always
+used with AES encryption.
+</li>
+
+<li>
+The 
+<a href="/pkg/crypto/md5/"><code>crypto/md5</code></a> package
+adds a new <a href="/pkg/crypto/md5/#Sum"><code>Sum</code></a> function
+to simplify hashing without sacrificing performance.
+</li>
+
+<li>
+Similarly, the 
+<a href="/pkg/crypto/md5/"><code>crypto/sha1</code></a> package
+adds a new <a href="/pkg/crypto/sha1/#Sum"><code>Sum</code></a> function.
+</li>
+
+<li>
+Also, the
+<a href="/pkg/crypto/sha256/"><code>crypto/sha256</code></a> package
+adds <a href="/pkg/crypto/sha256/#Sum256"><code>Sum256</code></a>
+and <a href="/pkg/crypto/sha256/#Sum224"><code>Sum224</code></a> functions.
+</li>
+
+<li>
+Finally, the <a href="/pkg/crypto/sha512/"><code>crypto/sha512</code></a> package
+adds <a href="/pkg/crypto/sha512/#Sum512"><code>Sum512</code></a> and
+<a href="/pkg/crypto/sha512/#Sum384"><code>Sum384</code></a> functions.
+</li>
+
+<li>
+The <a href="/pkg/crypto/x509/"><code>crypto/x509</code></a> package
+adds support for reading and writing arbitrary extensions.
+</li>
+
+<li>
+The <a href="/pkg/crypto/tls/"><code>crypto/tls</code></a> package adds
+support for TLS 1.1, 1.2 and AES-GCM.
+</li>
+
+<li>
+The <a href="/pkg/database/sql/"><code>database/sql</code></a> package adds a
+<a href="/pkg/database/sql/#DB.SetMaxOpenConns"><code>SetMaxOpenConns</code></a>
+method on <a href="/pkg/database/sql/#DB"><code>DB</code></a> to limit the
+number of open connections to the database.
+</li>
+
+<li>
+The <a href="/pkg/encoding/csv/"><code>encoding/csv</code></a> package
+now always allows trailing commas on fields.
+</li>
+
+<li>
+The <a href="/pkg/encoding/gob/"><code>encoding/gob</code></a> package
+now supports the generic encoding interfaces of the
+<a href="/pkg/encoding/"><code>encoding</code></a> package
+described above.
+</li>
+
+<li>
+The <a href="/pkg/encoding/json/"><code>encoding/json</code></a> package
+now will alway escape ampersands as "\u0026" when printing strings.
+It will now accept but correct invalid UTF-8 in
+<a href="/pkg/encoding/json/#Marshal"><code>Marshal</code></a>
+(such input was previously rejected).
+Finally, it now supports the generic encoding interfaces of the
+<a href="/pkg/encoding/"><code>encoding</code></a> package
+described above.
+</li>
+
+<li>
+The <a href="/pkg/encoding/xml/"><code>encoding/xml</code></a> package
+now allows attributes stored in pointers to be marshaled.
+It also supports the generic encoding interfaces of the
+<a href="/pkg/encoding/"><code>encoding</code></a> package
+described above through the new
+<a href="/pkg/encoding/xml/#Marshaler"><code>Marshaler</code></a>,
+<a href="/pkg/encoding/xml/#UnMarshaler"><code>UnMarshaler</code></a>,
+and related
+<a href="/pkg/encoding/xml/#MarshalerAttr"><code>MarshalerAttr</code></a> and
+<a href="/pkg/encoding/xml/#UnmarshalerAttr"><code>UnmarshalerAttr</code></a>
+interfaces.
+</li>
+
+<li>
+The <a href="/pkg/flag/"><code>flag</code></a> package now
+has a <a href="/pkg/flag/#Getter"><code>Getter</code></a> interface
+to allow the value of a flag to be retrieved. Due to the
+Go 1 compatibility guidelines, this method cannot be added to the existing
+<a href="/pkg/flag/#Value"><code>Value</code></a>
+interface, but all the existing standard flag types implement it.
+The package also now exports the <a href="/pkg/flag/#CommandLine"><code>CommandLine</code></a>
+flag set, which holds the flags from the command line.
+</li>
+
+<li>
+The <a href="/pkg/go/build/"><code>go/build</code></a> package adds
+the <a href="/pkg/go/build/#Package.AllTags"><code>AllTags</code></a> field
+to the <a href="/pkg/go/build/#Package"><code>Package</code></a> type,
+to make it easier to process build tags.
+</li>
+
+<li>
+The <a href="/pkg/image/draw/"><code>image/draw</code></a> package now
+exports an interface, <a href="/pkg/image/draw/#Drawer"><code>Drawer</code></a>,
+that wraps the standard <a href="/pkg/image/draw/#Draw"><code>Draw</code></a> method.
+The Porter-Duff operators now implement this interface, in effect binding an operation to
+the draw operator rather than providing it explicitly.
+Given a paletted image as its destination, the new
+<a href="/pkg/image/draw/#FloydSteinberg"><code>FloydSteinberg</code></a>
+implementation of the
+<a href="/pkg/image/draw/#Drawer"><code>Drawer</code></a>
+interface will use the Floyd-Steinberg error diffusion algorithm to draw the image.
+To create palettes suitable for such processing, the new
+<a href="/pkg/image/draw/#Quantizer"><code>Quantizer</code></a> interface
+represents implementations of quantization algorithms that choose a palette
+given a full-color image.
+There are no implementations of this interface in the library.
+</li>
+
+<li>
+The <a href="/pkg/image/gif/"><code>image/gif</code></a> package
+can now create GIF files using the new
+<a href="/pkg/image/gif/#Encode"><code>Encode</code></a>
+and <a href="/pkg/image/gif/#EncodeAll"><code>EncodeAll</code></a>
+functions.
+Their options argument allows specification of an image
+<a href="/pkg/image/draw/#Quantizer"><code>Quantizer</code></a> to use;
+if it is <code>nil</code>, the generated GIF will use the 
+<a href="/pkg/image/color/palette/#Plan9"><code>Plan9</code></a>
+color map (palette) defined in the new
+<a href="/pkg/image/color/palette/"><code>image/color/palette</code></a> package.
+The options also specify a
+<a href="/pkg/image/draw/#Drawer"><code>Drawer</code></a>
+to use to create the output image;
+if it is <code>nil</code>, Floyd-Steinberg error diffusion is used.
+</li>
+
+<li>
+The<a href="/pkg/io/#Copy"><code>Copy</code></a> method of the
+<a href="/pkg/io/"><code>io</code></a> package now prioritizes its
+arguments differently.
+If one argument implements <a href="/pkg/io/#WriterTo"><code>WriterTo</code></a>
+and the other implements i<a href="/pkg/o/#ReaderFrom"><code>ReaderFrom</code></a>,
+<a href="/pkg/io/#Copy"><code>Copy</code></a> will now invoke
+<a href="/pkg/io/#WriterTo"><code>WriterTo</code></a> to do the work,
+so that less intermediate buffering is required in general.
+</li>
+
+<li>
+net: new build tag netgo for building a pure Go net package (CL 7100050).
+</li>
+
+<li>
+net/http: don't allow sending invalid cookie lines (CL 12204043).
+</li>
+
+<li>
+net/http: allow ReadResponse with nil *Request parameter (CL 9821043).
+</li>
+
+<li>
+net/http: allow responses to HEAD requests, detect type and length (CL 12583043).
+</li>
+
+<li>
+The <a href="/pkg/runtime/"><code>runtime</code></a> package relaxes
+the constraints on finalizer functions in
+<a href="/pkg/runtime/#SetFinalizer"><code>SetFinalizer</code></a>: the
+actual argument can now be any type that is assignable to the formal type of
+the function, as is the case for any normal function call in Go.
+</li>
+
+<li>
+The <a href="/pkg/sort/"><code>sort</code></a> package has a new
+<a href="/pkg/sort/#Stable"><code>Stable</code></a> function that implements
+stable sorting. It is less efficient than the normal sort algorithm, however.
+</li>
+
+<li>
+The <a href="/pkg/strings/"><code>strings</code></a> package adds
+an <a href="/pkg/strings/#IndexByte"><code>IndexByte</code></a>
+function for consistency with the <a href="/pkg/bytes/"><code>bytes</code></a> package.
+</li>
+
+<li>
+syscall: implemented Sendfile for Darwin, added Syscall9 for Darwin/amd64 (CL 10980043).
+</li>
+
+<li>
+The <a href="/pkg/testing/"><code>testing</code></a> package
+now exports the<a href="/pkg/testing/#TB"><code>TB</code></a> interface.
+It records the methods in common with the
+<a href="/pkg/testing/#T"><code>T</code></a>
+and
+<a href="/pkg/testing/#B"><code>B</code></a> types,
+to make it easier to share code between tests and benchmarks.
+Also, the
+<a href="/pkg/testing/#AllocsPerRun"><code>AllocsPerRun</code></a>
+function now quantizes the return value to an integer (although it
+still has type <code>float64</code>), to round off any error caused by
+initialization and make the result more repeatable. 
+</li>
+
+<li>
+The <a href="/pkg/text/template/"><code>text/template</code></a> package
+now automatically dereferences pointer values when evaluating the arguments
+to "escape" functions such as "html", to bring the behavior of such functions
+in agreement with that of other printing functions such as "printf".
+</li>
+
+<li>
+In the <a href="/pkg/time/"><code>time</code></a> package, the
+<a href="/pkg/time/#Parse"><code>Parse</code></a> function
+and
+<a href="/pkg/time/#Format"><code>Format</code></a>
+method
+now handle time zone offsets with seconds, such as in the historical
+date "1871-01-01T05:33:02+00:34:08".
+Also, pattern matching in the formats for those routines is stricter: a non-lowercase letter
+must now follow the standard words such as "Jan" and "Mon".
+</li>
+
+<li>
+The <a href="/pkg/unicode/"><code>unicode</code></a> package
+adds <a href="/pkg/unicode/#In"><code>In</code></a>,
+a nicer-to-use but equivalent version of the original
+<a href="/pkg/unicode/#IsOneOf"><code>IsOneOf</code></a>,
+to see whether a character is a member of a Unicode category.
+</li>
+
+</ul>
+diff --git a/doc/go1.2.txt b/doc/go1.2.txt
+deleted file mode 100644
+index 11b7b9e12e..0000000000
+--- a/doc/go1.2.txt
++++ /dev/null
@@ -1,82 +0,0 @@
-This file collects notes about what has changed since Go 1.1
-and should be mentioned in the Go 1.2 release notes.
-During the Go 1.2 release process it will be necessary to convert
-it to HTML, similar to go1.1.html, but for now it is a text file,
-to make the process of keeping it up-to-date more lightweight.
-
-Please keep the descriptions to a single line, starting with the
-package or cmd/xxx directory name, and ending in a CL number.
-Please keep the list sorted (as in sort.Strings of the lines).
-
-Performance:
-compress/bzip2: faster decompression by 30% (CL 9915043).
-crypto/des: 5x faster encoding/decoding (CL 11874043, 12072045).
-encoding/json: faster encoding (CL 9129044).
-net: improve windows performance by up to 30% (CL 8670044).
-net: improve performance on BSD by up to 30% (CL 8264043, 12927048, 13080043).
-
-Breaking change:
-archive/tar,archive/zip: fix os.FileInfo implementation to provide base name only (CL 13118043).
-
-cmd/5a: removed support for R9/R10 (use m/g instead) (CL 9840043).
-cmd/5l: add MOVBS, MOVHS etc for sub-word moves (CL 12682043).
-cmd/5l: support for external linking for linux/arm (CL 12871044).
-cmd/cgo, cmd/go: support including C++ code with cgo (CL 8248043).
-cmd/gc: three-index slicing to set cap as well as length (CL 10743046).
-cmd/gc: make missing package error fatal (CL 12677043).
-cmd/go: test coverage (CL 10413044).
-cmd/go: add -t flag to 'go get' to download test dependencies (CL 12566046).
-cmd/go: delete 'go doc' (CL 12974043).
-
-archive/zip: add File.DataOffset accessor (CL 12784045).
-bufio: add Reset methods to Reader and Writer (CL 12603049).
-compress/bzip2: support concatenated files (CL 12387044).
-compress/flate: add Reset method on Writer (CL 12265043).
-compress/gzip: add Reset method on Writer (CL 13435043).
-container/heap: added Fix (CL 12265043).
-container/list: added MoveBefore and MoveAfter (CL 12021044).
-crypto/cipher: AES-GCM mode (CL 12375043).
-crypto/md5: Sum function to simplify hashing (CL10624044).
-crypto/sha1: Sum function to simplify hashing (CL 10571043).
-crypto/sha256: Sum256 and Sum224 functions to simplify hashing (CL 10629043).
-crypto/sha512: Sum512 and Sum384 functions to simplify hashing (CL 10630043).
-crypto/x509: add support for reading and writing arbitrary extensions (CL 12056043).
-crypto/tls: add support for TLS 1.1, 1.2 and AES-GCM. (CL 7872043, 10762044 and 13249044).
-database/sql: add SetMaxOpenConns method on DB (CL 10726044).
-encoding: new package defining generic encoding interfaces (CL 12541051).
-encoding/csv: always allow trailing commas (CL 12294043).
-encoding/gob: support generic encoding interfaces (CL 12681044).
-encoding/json: accept but correct invalid UTF-8 in Marshal (CL 11211045).
-encoding/json: always escape ampersands (CL 12708044).
-encoding/json: support generic encoding interfaces (CL 12703043).
-encoding/xml: allow attributes stored in pointers to be marshaled (CL 8653047).
-encoding/xml: add Marshaler, MarshalerAttr interfaces (CL 12919043).
-encoding/xml: add Unmarshaler, UnmarshalerAttr interfaces (CL 12556043).
-encoding/xml: support generic encoding interfaces (CL 12751045).
-flag: add Getter interface (CL 10472043).
-flag: export commandLine (now CommandLine) (CL 12587043).
-fmt: indexed access to arguments in Printf etc. (CL 9680043).
-go/build: support including C++ code with cgo (CL 8248043).
-go/build: add Package.AllTags (CL 12703044).
-image/draw: added Drawer, FloydSteinberg and the op.Draw method (CL 10977043).
-image/draw: added Quantizer type (CL 11148043).
-image/gif: added Encode and EncodeAll (CL 10896043).
-io: Copy prioritizes WriterTo over ReaderFrom (CL 9462044).
-net: new build tag netgo for building a pure Go net package (CL 7100050).
-net/http: don't allow sending invalid cookie lines (CL 12204043).
-net/http: allow ReadResponse with nil *Request parameter (CL 9821043).
-net/http: allow responses to HEAD requests, detect type and length (CL 12583043).
-runtime: relax constraint on finalizer func in SetFinalizer (CL 12895043).
-runtime: preemption of goroutines at function entry (CL 12371043).
-sort: new Stable function provides stable sort (CL 9612044).
-strings: add IndexByte, for consistency with bytes package (CL 12214044).
-sync/atomic: add Swap functions (CL 12670045).
-syscall: implemented Sendfile for Darwin, added Syscall9 for Darwin/amd64 (CL 10980043).
-testing: AllocsPerRun is now quantized to an integer (the type is still float64) (CL 9837049).
-testing: add TB interface (intersection of T and B's methods) (CL 12962043).
-text/template: add comparison functions (CL 13091045).
-text/template: dereference pointer values when evaluating args escape funcs (CL 13257043).
-text/template: allow {{else if ... }} to simplify if chains (CL 13327043).
-time: Allow Parse and Format to handle time zone offsets with seconds (CL 8132044)
-time: patterns require non-lowercase letter to follow Mon, Jan etc (CL 12448044).
-unicode: add In, a nicer-to-use but equivalent version of IsOneOf (CL 11672044).

この差分は、doc/go1.2.html が新規ファイルとして追加され、doc/go1.2.txt が削除されたことを示しています。

コアとなるコードの解説

doc/go1.2.html の追加

追加された doc/go1.2.html は、Goのドキュメントシステムが解釈する特別なコメントブロックで始まります。これにより、このHTMLファイルがGoの公式ウェブサイト上でどのように表示されるか(タイトル、URLパスなど)が定義されます。

ファイルの内容は、Go 1.1のリリースノートの構造と一部のテキストを再利用しています。特に、Go 1.1のリリースノートからの引用部分が赤字 (<font color=red>) で示されており、これらはGo 1.2の具体的な内容に更新されるべきプレースホルダーとして機能します。

HTMLの各セクション(<h2>, <h3>)は、Go 1.2で導入される予定の主要な変更カテゴリ(言語の変更、実装とツールの変更、パフォーマンス、標準ライブラリの変更など)に対応しています。これらのセクションには、既にいくつかの具体的な変更点(例: Three-index slices, goroutine preemption, go コマンドの変更、新しいパッケージ、パフォーマンス改善、標準ライブラリの追加機能など)がリストアップされており、それぞれの項目には関連するCL(Change List)番号が記載されています。これにより、リリースノートの作成者は、これらのCLを参照しながら詳細な説明を記述していくことができます。

doc/go1.2.txt の削除

doc/go1.2.txt は、Go 1.1リリース以降の変更点を箇条書きで記録していたテキストファイルです。このファイルは、Go 1.2のリリースノートの初期ドラフトとして機能していましたが、HTML形式への移行に伴い、その役割を終えました。このファイルの削除は、リリースノートの情報をHTMLファイルに一本化し、ドキュメントの管理と更新を効率化するための措置です。これにより、将来的に複数のファイル間で情報が重複したり、不整合が生じたりするリスクが低減されます。

関連リンク

参考にした情報源リンク