Skip to content

Releases

v0.0.1-beta.9: Merge pull request #116 from goesm-dev/claude/project-thread-e8tcbc

Choose a tag to compare

@github-actions github-actions released this 30 Oct 01:20
a509ac7

Tagged on 2026-10-30. Changes since v0.0.1-beta.8: v0.0.1-beta.8...v0.0.1-beta.9.

Bundle size

  • A Cloudflare Worker serving one Connect service with connect-go bundles to 1.9 MB minified (457 KB gzipped) instead of 4.5 MB (1.18 MB gzipped), imports in 210 ms instead of 570 ms on Node and answers a unary call in 215 µs instead of 340 µs (testdata/usecases/worker, TestUseCaseWorker):
    • Package variable initializers and init functions with no effect besides computing their variables are left out when reachable code does not use those variables: net/http's TLS defaults, crypto/tls's tables, nistec's P-256 table and x/text's normalization tables kept TLS, X.509 and elliptic curves.
    • The self-tests of crypto/internal/fips140, which run only in FIPS 140 mode, no longer keep the hashes, AES and the key derivations through the init functions that pass them.
    • Only the entry packages are roots of reachable code: the other packages of the module count for what the entries use, so a server leaves out the client of its generated connect-go package, with net/http's client.
    • Reflection's MethodByName with a constant name keeps the methods of that name only of the types stored in interface values, as Go's linker does: protobuf's descriptor formatting calling Get kept http.Client.Get.
  • The same Worker bundles to 1.70 MB minified (413 KB gzipped):
    • A program that serves requests only through fetchHandler no longer stores a *http.Server in an interface value, whose type descriptor kept crypto/tls, crypto/x509 and math/big for reflection.
    • The method table of a type that reachable code never stores in an interface value is empty: no type assertion, interface call or reflection looks it up, and the signatures of its methods kept the types they mention.
    • The method table of an unnamed struct type with promoted methods is set up in a pure initializer, so that bundlers drop the type with the methods it keeps when nothing uses it: encoding/json/v2's wrappers of Marshaler and the like were always kept.
    • Initializers of the form var x, _ = f() with no effect besides computing x are left out when reachable code does not use x, as single-value ones are: edwards25519's base points.
  • The same Worker bundles to 1.52 MB minified (369 KB gzipped): encoding/json's Marshal and Unmarshal, for the values the runtime does not handle itself, run the encoder and decoder of encoding/json's own implementation (GOEXPERIMENT=nojsonv2), changed to return what Go 1.27's default, json v2 with v1 options, returns: the same errors, partial results, map keys, struct tag names and output. json v2, jsontext and their tables are left out (the json code of the Worker shrinks from about 190 KB to 47 KB), unless the program declares a method named MarshalJSONTo or UnmarshalJSONFrom, which only json v2 calls. testdata/programs/jsonlegacy compares 5,000 random cases with native Go.

Fixes

  • reflect.Type's String of an unnamed struct type shows the fields' tags, as Go does (struct { F int "json:\"f\"" }), and is struct {} for an empty one.

Blocking analysis

  • Blocking is decided again for the code reachable from the entries: code that never runs does not make other code async. In the Worker, the io.Pipe of connect-go's and net/http's clients made io.Reader's Read block, and through protobuf's Format methods every fmt.Sprintf and fmt.Errorf.

日本語

2026-10-30 にタグを付けました。v0.0.1-beta.8 からの差分は v0.0.1-beta.8...v0.0.1-beta.9 で確認できます。

バンドルサイズ

  • connect-go で Connect のサービスを 1 つ提供する Cloudflare Worker のバンドルは、minify 後 4.5 MB (gzip で 1.18 MB) から 1.9 MB (gzip で 457 KB) になりました。Node での import は 570 ms から 210 ms に、unary 呼び出しの応答は 340 µs から 215 µs になりました (testdata/usecases/worker、TestUseCaseWorker)。
    • 変数の計算以外に効果を持たないパッケージ変数の初期化式と init 関数は、到達可能なコードがその変数を使わなければ出力しません。net/http の TLS の既定値、crypto/tls の表、nistec の P-256 の表、x/text の正規化の表が、TLS、X.509、楕円曲線を残していました。
    • FIPS 140 mode でだけ実行する crypto/internal/fips140 の自己テストが、それを渡す init 関数を通じてハッシュ、AES、鍵導出を残すことはなくなりました。
    • 到達可能なコードの起点は entry パッケージだけになりました。モジュールのほかのパッケージは entry が使う部分だけを数えるので、サーバーは生成された connect-go のパッケージのクライアントと net/http のクライアントを含みません。
    • 引数が定数の reflection の MethodByName は、interface の値に格納される型のその名前のメソッドだけを残すようになりました。Go のリンカーと同じ扱いです。protobuf の descriptor の整形が Get を呼ぶため、http.Client.Get が残っていました。
  • 同じ Worker のバンドルは、minify 後 1.70 MB (gzip で 413 KB) になりました。
    • fetchHandler だけでリクエストを処理するプログラムは、*http.Server を interface の値に格納しなくなりました。その型記述子が、reflection のために crypto/tls、crypto/x509、math/big を残していました。
    • 到達可能なコードが interface の値に格納しない型のメソッド表は空になりました。型アサーション、interface 経由の呼び出し、reflection のいずれもその表を参照しません。メソッドのシグネチャが、そこに現れる型を残していました。
    • 埋め込みによるメソッドを持つ名前のない struct 型のメソッド表は、副作用のない初期化式の中で設定するようになりました。その型を使うコードがなければ、バンドラーは型とメソッドをまとめて削除します。encoding/json/v2 の Marshaler などのラッパーが常に残っていました。
    • var x, _ = f() の形の初期化式も、x の計算以外に効果を持たず、到達可能なコードが x を使わなければ、値が 1 つの初期化式と同じく出力しません。edwards25519 の基点が残っていました。
  • 同じ Worker のバンドルは、minify 後 1.52 MB (gzip で 369 KB) になりました。runtime が自身で処理しない値の encoding/json の Marshal と Unmarshal は、encoding/json 自身の実装 (GOEXPERIMENT=nojsonv2) の encoder と decoder で処理するようになりました。Go 1.27 の既定である json v2 を v1 の option で使った場合と同じ結果を返すよう変えてあり、エラー、途中までの結果、map の key、struct tag の名前、出力が一致します。json v2、jsontext とその表は出力しません (Worker の JSON のコードは約 190 KB から 47 KB になりました)。ただし、json v2 だけが呼ぶ MarshalJSONTo か UnmarshalJSONFrom という名前のメソッドを宣言するプログラムは json v2 を使います。testdata/programs/jsonlegacy が 5,000 件のランダムな例で native Go と比べます。

修正

  • 名前のない struct 型の reflect.Type の String は、Go と同じく field の tag を表示するようになりました (struct { F int "json:\"f\"" })。空の struct では struct {} です。

ブロッキング解析

  • entry から到達可能なコードについて、block するかどうかを判定し直すようになりました。実行されないコードが他のコードを async にすることはありません。この Worker では、connect-go と net/http のクライアントが使う io.Pipe のために io.Reader の Read が block し、protobuf の Format メソッドを通じてすべての fmt.Sprintf と fmt.Errorf が async になっていました。

Merge pull request #112 from goesm-dev/release/v0.0.1-beta.8

Choose a tag to compare

@github-actions github-actions released this 21 Oct 00:25
acaf086

Tagged on 2026-10-21. Changes since v0.0.1-beta.7: v0.0.1-beta.7...v0.0.1-beta.8.

JS calling ABI

  • A //goesm:import function may have a body, such as { panic("goesm:import") }, which goesm replaces with the import, so that go build and go vet accept the package without an empty assembly file.
  • An entry whose exported functions take a pointer to a struct type of another package, whose methods return a pointer to the same type, gave that type its JS methods twice, which esbuild rejected ("The symbol ... has already been declared"). It gives them once.
  • //goesm:import "<module>" <export> lazy imports the module with a dynamic import() on the first call of the function, so that a bundler splits it into a chunk of its own. The function blocks like an await import (docs/js-imports.md).
  • A nil slice or map that Go passes to JavaScript, as an exported function's result or a //goesm:import function's argument, is an empty array, Uint8Array, object or Map instead of null, as JavaScript code would return, and result types no longer include | null. JavaScript may still pass null for one.
  • A js struct tag names a field in JavaScript ahead of its json tag: ID int `json:"id" js:"ID"` is ID in JavaScript, and js:"-" leaves a field out.

syscall/js

  • Get, Index, Length and Call work on booleans, numbers and strings as property accesses do in JavaScript (js.ValueOf("abc").Length() is 3) instead of panicking. undefined and null still panic with a *js.ValueError.
  • The new package github.com/goesm-dev/goesm/promise waits for a Promise: promise.Await(p) returns its value, or its rejection reason as a js.Error, so that errors.As reaches an AbortError. goesm compiles it to await; with Go's WebAssembly port it waits with then callbacks (docs/dom.md).
  • The new package github.com/goesm-dev/goesm/jscompat gives Go code JavaScript's behaviour where Go's differs: RegExp for patterns in JavaScript's syntax (lookaround, backreferences), Normalize (NFC, NFD, NFKC, NFKD), Round as Math.round, the engine's Cos, Sin and other Math functions, and UTF16Offset, ByteOffset and UTF16Len for UTF-16 offsets such as selectionStart (docs/go-and-js.md).

Tools

  • goesm emit-ts -dts also writes a declaration file of each built package's exports, <package>.d.ts, which imports no other file (docs/js-exports.md).
  • The warning about functions goesm cannot lower yet lists only those that code reachable from the program's roots may call, and names them without -v, which adds each one's position and reason. A program printing with fmt was warned about 19 functions of internal/abi and internal/bytealg it never calls.

regexp

  • A constant pattern is matched with the engine's RegExp also when a search by backtracking can take time quadratic in the input, instead of only linear: a pattern that can start anywhere and rescans, such as \d+x or (\w+)@(\w+), and one that tries each split of a run once, such as ^(\S+)\s+(.*)$ or unicode-range:\s*([^;]+);. A program whose patterns are all of this kind no longer keeps Go's parser and engines, about 55 KB gzip. Patterns that can take longer, such as (a+)+b or \d+\d+$, still keep them. The Image app of richinosan/toolbox, with its 14 patterns compiled by regexp.MustCompile instead of its own wrapper of JS RegExp, goes from 120.0 KB to 81.9 KB gzip (79.2 KB with the wrapper).

Bundle size

  • A string constant with non-ASCII text, such as Japanese, is a JS string literal of that text, converted to Go's bytes once when the module loads, instead of a \x escape per byte. A string that a syscall/js call takes is the text itself, with no conversion. goesm build writes such text as UTF-8 instead of \u escapes. A package of 300 Japanese messages went from 62.0 KB to 27.5 KB minified, and from 8.1 KB to 7.5 KB gzip.
  • A //goesm:import function that returns js.Value wraps the value directly, instead of going through the converter of JS values to Go values, which a program that imports only such functions no longer keeps.
  • syscall gets the host's fs, process and path from the runtime once, and js.Value.Get is a plain property read. Before, every Get checked for those three names.
  • time keeps the parser of a time zone's rule string (the TZ string after the last transition) only when the program loads time zone data, such as with time.LoadLocation.
  • A call of strconv.FormatFloat or AppendFloat with bitSize 64 and a constant format 'e', 'E', 'f', 'g' or 'G', and of strconv.ParseFloat with bitSize 64, converts with the engine's number formatting and parsing, giving Go's results (checked against Go on about 17,000 cases). A program that converts only such floats no longer keeps strconv's float conversions and their tables, about 25 KB minified.
  • fmt.Print, Println and Printf, and Fprint, Fprintln and Fprintf to os.Stdout or os.Stderr, write the formatted string to the host's standard output or error directly when the program never assigns those variables, takes their address or closes them, instead of through *os.File, internal/poll and syscall's file table. Println and Print of strings, booleans and numbers of the predeclared types are concatenated as Sprintf is. A package that calls fmt.Println("n =", n) goes from 49.4 KB to 30.7 KB gzip.
  • strings.Replacer is one JS RegExp of its old strings, with Go's order of matching, including empty old strings. A program that uses it no longer keeps Go's trie and byte replacers.

With these, the Image app of richinosan/toolbox went from 92.1 KB to 79.3 KB gzip and the Calendar app from 31.5 KB to 30.4 KB.

日本語

2026-10-21 にタグを付けました。v0.0.1-beta.7 からの差分は v0.0.1-beta.7...v0.0.1-beta.8 で確認できます。

JS calling ABI

  • //goesm:import の関数には { panic("goesm:import") } のような本体を書けるようになりました。goesm はその本体を取り込んだ関数に置き換えます。空のアセンブリファイルがなくても、go build と go vet がパッケージを受け付けます。
  • 別のパッケージの struct 型へのポインタを引数に取る関数を export し、その型のメソッドが同じ型へのポインタを返す場合、entry はその型に JS のメソッドを 2 回付けていたため、esbuild が「The symbol ... has already been declared」で拒否していました。1 回だけ付けるようになりました。
  • //goesm:import "<モジュール>" <エクスポート名> lazy は、関数を最初に呼んだ時点で動的な import() によってモジュールを読み込みます。バンドラーはそのモジュールを別のチャンクに分けます。関数は await の import と同じくブロックします (docs/js-imports.ja.md)。
  • Go から JavaScript に渡す nil のスライスとマップは、null ではなく空の配列、Uint8Array、オブジェクト、Map になりました。対象は、export した関数の戻り値と //goesm:import の関数の引数です。JavaScript のコードが返す値と同じ形であり、戻り値の型からも | null がなくなりました。JavaScript からは、これまでどおり null も渡せます。
  • js の struct タグで、JavaScript でのフィールド名を json タグより優先して指定できるようになりました。ID int `json:"id" js:"ID"` は JavaScript では ID になり、js:"-" を付けたフィールドは JavaScript に渡りません。

syscall/js

  • Get、Index、Length、Call は、真偽値、数値、文字列に対して panic せず、JavaScript のプロパティアクセスと同じように動くようになりました (js.ValueOf("abc").Length() は 3)。undefined と null に対しては、これまでどおり *js.ValueError で panic します。
  • Promise を待つパッケージ github.com/goesm-dev/goesm/promise を追加しました。promise.Await(p) は Promise の値を返し、拒否された場合は拒否の理由を js.Error として返します。そのため、errors.As で AbortError を取り出せます。goesm はこの関数を await に変換し、Go の WebAssembly 版では then のコールバックで待ちます (docs/dom.ja.md)。
  • パッケージ github.com/goesm-dev/goesm/jscompat を追加しました。Go と JavaScript で振る舞いが違う処理について、Go のコードに JavaScript と同じ振る舞いを提供します。JavaScript の構文 (先読み、後読み、後方参照) のパターンを扱う RegExp、Normalize (NFC、NFD、NFKC、NFKD)、Math.round と同じく丸める Round、エンジンの Cos、Sin などの Math の関数、selectionStart などの UTF-16 の位置を変換する UTF16Offset、ByteOffset、UTF16Len があります (docs/go-and-js.ja.md)。

ツール

  • goesm emit-ts -dts は、ビルドしたパッケージのエクスポートの宣言ファイル <パッケージ>.d.ts も書き出します。このファイルはほかのファイルを import しません (docs/js-exports.ja.md)。
  • goesm がまだ変換できない関数の警告は、プログラムの起点から到達できるコードが呼び得る関数だけを数え、-v なしでも名前を表示するようになりました。-v を付けると、それぞれの位置と理由も表示します。これまでは fmt で出力するプログラムに対して、呼ばれることのない internal/abi と internal/bytealg の 19 個の関数について警告していました。

regexp

  • 定数のパターンは、バックトラックによる検索に入力の長さの 2 乗に比例する時間がかかり得る場合も、線形時間の場合と同じく engine の RegExp で照合するようになりました。\d+x や (\w+)@(\w+) のようにどこからでも始まり同じ範囲を走査し直すパターンと、^(\S+)\s+(.*)$ や unicode-range:\s*([^;]+); のように並びの分け方を 1 回ずつ試すパターンが該当します。こうしたパターンだけを使うプログラムには、Go の parser とエンジン (gzip 後約 55 KB) が残らなくなりました。(a+)+b や \d+\d+$ のようにさらに時間がかかり得るパターンでは、これまでどおり残ります。richinosan/toolbox の Image アプリで、独自の JS RegExp の wrapper の代わりに 14 個のパターンを regexp.MustCompile でコンパイルすると、gzip 後の大きさは 120.0 KB から 81.9 KB になります (wrapper では 79.2 KB)。

バンドルサイズ

  • 日本語など ASCII 以外の文字を含む文字列定数は、1 バイトごとの \x エスケープではなく、その文字列の JS の文字列 literal になりました。Go のバイト列への変換は module を読み込むときに 1 回だけ行います。syscall/js の呼び出しに渡す文字列は変換せずにそのまま渡します。goesm build はこうした文字を \u エスケープではなく UTF-8 で書き出します。日本語のメッセージを 300 件持つパッケージは、minify 後 62.0 KB から 27.5 KB に、gzip 後 8.1 KB から 7.5 KB になりました。
  • js.Value を返す //goesm:import 関数は、JS の値を Go の値に変換する converter を通さずに値を直接包むようになりました。そうした関数だけを import するプログラムに converter が残らなくなりました。
  • syscall は host の fs、process、path を runtime から 1 回だけ受け取り、js.Value.Get は単なるプロパティの読み出しになりました。これまでは Get のたびにこの 3 つの名前を確認していました。
  • time は、time.LoadLocation などでタイムゾーンのデータを読み込むプログラムにだけ、タイムゾーンの規則の文字列 (最後の遷移より後の TZ 文字列) の parser を残すようになりました。
  • bitSize が 6...
Read more

v0.0.1-beta.7: Merge pull request #105 from goesm-dev/claude/initial-app-7x639y

Choose a tag to compare

@github-actions github-actions released this 17 Oct 06:56
33d4c54

Tagged on 2026-10-17. Changes since v0.0.1-beta.6: v0.0.1-beta.6...v0.0.1-beta.7.

Bundle size

  • A switch whose cases are all constants of a boolean, string or number type (not int64 or uint64) is a JS switch on the tag, instead of a chain of comparisons selecting a case index.
  • unicode.ToUpper and ToLower beyond ASCII are the engine's toUpperCase and toLowerCase of the rune, with Go's simple mapping where the engine's full mapping gives several runes. A program that converts case no longer keeps CaseRanges, about 10 KB minified. A case pair added in a later Unicode version than the engine's is left unmapped.
  • A call of slices.Sort (also through sort.Ints and sort.Strings) whose element type is an integer or string type where it is called goes to the engine's sort directly. A program that sorts only those no longer keeps slices.Sort and its pdqsort, about 7 KB minified.

日本語

2026-10-17 にタグを付けました。v0.0.1-beta.6 からの差分は v0.0.1-beta.6...v0.0.1-beta.7 で確認できます。

バンドルサイズ

  • すべての case が bool、文字列、数値の型 (int64 と uint64 を除く) の定数である switch は、比較を並べて case の番号を選ぶ代わりに、tag に対する JS の switch になりました。
  • ASCII 以外の rune の unicode.ToUpper と ToLower は engine の toUpperCase と toLowerCase になりました。engine の完全な対応が複数の rune になる場合は Go の単純な対応を返します。大文字小文字を変換するプログラムに CaseRanges (minify 後約 10 KB) が残らなくなりました。engine のものより新しい Unicode のバージョンで追加された大文字と小文字の組は変換しません。
  • 呼び出す場所で要素の型が整数か文字列の型と決まっている slices.Sort (sort.Ints と sort.Strings 経由も含む) の呼び出しは、engine の sort を直接呼ぶようになりました。それだけをソートするプログラムに slices.Sort とその pdqsort (minify 後約 7 KB) が残らなくなりました。

v0.0.1-beta.6

v0.0.1-beta.6 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 17 Oct 06:56
e70b2d5

Tagged on 2026-10-17. Changes since v0.0.1-beta.5: v0.0.1-beta.5...v0.0.1-beta.6.

Blocking analysis

  • A call of a variable of function type that is only ever assigned function literals, declared functions or nil, and whose address is never taken, blocks only if one of those does. Before, it blocked as soon as any function value of its signature in the program did, so in an app built as one program (gosfc) a Vue component whose setup calls such a variable could become async, and Vue then could not use its setup.

日本語

2026-10-17 にタグを付けました。v0.0.1-beta.5 からの差分は v0.0.1-beta.5...v0.0.1-beta.6 で確認できます。

ブロッキング解析

  • 関数 literal、宣言された関数、nil しか代入されず、アドレスも取られない関数型の変数の呼び出しは、そのどれかがブロックするときだけブロックするようになりました。これまでは、プログラムのどこかで同じシグネチャの関数値が 1 つでもブロックするとブロックするとみなしていました。そのため、1 つのプログラムとしてビルドするアプリ (gosfc) では、こうした変数を呼ぶ Vue コンポーネントの setup が async になり、Vue がその setup を使えないことがありました。

v0.0.1-beta.5

v0.0.1-beta.5 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 17 Oct 04:27
0ba69f8

Tagged on 2026-10-17. Changes since v0.0.1-beta.4: v0.0.1-beta.4...v0.0.1-beta.5.

JS calling ABI

  • A handle that reaches JavaScript inside an any, such as a pointer to an instantiation of a generic type returned by a lookup function, has its exported methods, as a handle of a type named in an exported signature does; so does a handle inside a slice, map or struct in that any, and a handle one of their methods returns. JavaScript can pass any handle where an interface it implements is expected, also when Go never converts its type to that interface. gosfc reads the vue.Ref bindings of a component this way.
  • goesm emit-ts and goesm build -split take several packages and build them as one program: each is an entry with the JS calling ABI, and the packages they share are lowered once, so their modules share state. An entry that another entry imports is called by it as Go code, not through the JavaScript wrappers. gosfc builds all the components of an app as one program this way.
  • A //goesm:import function can return a pointer to a non-struct type, such as *string: null or undefined becomes nil, any other value a pointer to it. Parameters take such pointers too.
  • A function made by js.FuncOf returns its result directly unless its own Go function blocks. Before, as soon as one function passed to js.FuncOf blocked, every one returned a Promise.

Standard library

  • time.Local follows the host's time zone rules: a time on the other side of a daylight saving transition has that side's offset, as a JavaScript Date does, instead of the offset at start-up. Zones are named by their offsets, as UTC-5. IsDST reports whether the offset is larger than the one 182 days before or after, which differs from Go's in zones whose daylight saving time moves clocks back, such as Europe/Dublin.

Bundle size

  • A method called through an interface is kept only if the program stores a value of its type in an interface. A program that calls some String or Error method, as one that reads err.Error() does, no longer carries time.Time's formatting. Without package reflect, storing a value in an interface no longer counts as storing what it contains (the chan time.Time of a timer).
  • strconv.IsPrint and the quoting of strconv.Quote ask the engine's Unicode tables instead of carrying Go's (7 KB), and floats are formatted with the engine's integer formatting instead of formatBase10. Characters newer than the engine's Unicode version are not printable.

日本語

2026-10-17 にタグを付けました。v0.0.1-beta.4 からの差分は v0.0.1-beta.4...v0.0.1-beta.5 で確認できます。

JS 呼び出しの ABI

  • any に入って JavaScript に渡るハンドル (ルックアップ関数が返すジェネリック型のインスタンスへのポインタなど) も、export された関数のシグネチャに現れる型のハンドルと同じように公開メソッドを持つようになりました。その any に入ったスライス、マップ、構造体の中のハンドルや、それらのメソッドが返すハンドルも同じです。また JavaScript は、Go のコードがその interface に変換していない型のハンドルも、その型が実装する interface を受け取る引数に渡せます。gosfc は、コンポーネントの vue.Ref のバインディングをこの方法で読みます。
  • goesm emit-ts と goesm build -split は複数のパッケージを受け取り、1 つのプログラムとしてビルドするようになりました。どのパッケージも JS 呼び出しの ABI を持つエントリーになり、それらが共有するパッケージは 1 回だけ変換されるので、各モジュールは状態を共有します。ほかのエントリーがインポートするエントリーは、JavaScript 向けのラッパーではなく Go のコードとして呼ばれます。gosfc はアプリのすべてのコンポーネントをこの方法で 1 つのプログラムとしてビルドします。
  • //goesm:import の関数が *string のような構造体以外へのポインタを返せるようになりました。null と undefined は nil に、それ以外の値はその値へのポインタになります。引数にも使えます。
  • js.FuncOf で作った関数は、その Go の関数自身がブロックしない限り、結果をそのまま返すようになりました。これまでは js.FuncOf に渡した関数のどれか 1 つがブロックすると、すべてが Promise を返していました。

標準ライブラリ

  • time.Local がホストのタイムゾーンの規則に従うようになりました。JavaScript の Date と同じく、夏時間の切り替えをまたいだ時刻には、起動時のオフセットではなくその時期のオフセットが使われます。ゾーン名は UTC-5 のようにオフセットから付けます。IsDST は 182 日前か 182 日後のオフセットより大きいかどうかを返すので、Europe/Dublin のように時計を戻す夏時間のゾーンでは Go と異なります。

バンドルサイズ

  • インターフェース経由で呼ばれるメソッドは、プログラムがその型の値をインターフェースに入れる場合にだけ残すようになりました。err.Error() を読むプログラムのように、どこかで String や Error を呼ぶプログラムにも、time.Time の書式化が入らなくなります。また、package reflect を使わないプログラムでは、値をインターフェースに入れても、その中身 (タイマーの chan time.Time など) まで入れたことにはしません。
  • strconv.IsPrint と strconv.Quote のエスケープは、Go の表 (7 KB) の代わりにエンジンの Unicode の表を使うようになりました。浮動小数点数の書式化も、formatBase10 の代わりにエンジンの整数の書式化を使います。エンジンの Unicode より新しい文字は印字可能と見なしません。