github.com/golang/goのissueを検索する
TIME rest time current/total
TopicsPlaceHolder

github.com/golang/goのissueを検索する

Layerx.go #0

May 24th, 2024

Profile

songmu

Profile

songmu

代表的なOSS

ご利用ありがとうございます!

github.com/golang/goのissueを検索する

Goの動向を逐一追いかけることはしていませんが、気になったことを調べる時に、GitHub上のissueを検索することが良くある。

Goのissueはフォーマットが整っていて、探しやすい

proposal: testing: allow regexps to specify example output #18831

 

https://github.com/golang/go/issues/18831

timestamperの例

入力をtransformして冒頭にタイムスタンプを付けてくれるライブラリ。

import github.com/Songmu/timestamper
var s transform.Transformer = timestamper.New()
var w io.WriteCloser = transform.NewWriter(os.Stdout, s)
fmt.Fprint(w, "Hello\nWorld!")
// Output:
// 2019-02-11T01:14:54.093021+09:00 Hello
// 2019-02-11T01:14:54.093151+09:00 World!

これを以下のように書きたいわけです。

// Regexp output:
// \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{6}\+\d{2}:\d{2} Hello
// \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{6}\+\d{2}:\d{2} World!

余談: Unordered output

前項のissue内の議論で出てきて知った。

math/rand/v2/example_test.go より

func ExamplePerm() {
    for _, value := range rand.Perm(3) {
        fmt.Println(value)
    }

    // Unordered output: 1
    // 2
    // 0
}

os/fsnotify: add new package #4068

https://github.com/golang/go/issues/4068

cmd/go: add //go:embed all:<pattern> to allow . and _ matches #43854

 
https://github.com/golang/go/issues/43854

//go:embed all:

proposal: log: change Logger to be an interface #13182

 
https://github.com/golang/go/issues/13182#issuecomment-239958401

proposal: sync: add a Reset method for sync.Once #25955

 
https://github.com/golang/go/issues/25955

Use ponce *sync.Once, and reset it by writing ponce = new(sync.Once).

勉強になった

regexp/syntax: document limit of 1000 in {n,m} quantifier forms #7252

 
https://github.com/golang/go/issues/7252

以下のようにドキュメントされてる。

Implementation restriction: The counting forms x{n,m}, x{n,}, and x{n} reject forms that create a minimum or maximum repetition count above 1000. Unlimited repetitions are not subject to this restriction.

cmd/go: build: add -static flag #26492

https://github.com/golang/go/issues/26492

flag: exit 0 for default -h/-help option #37533

https://github.com/golang/go/issues/37533

proposal: flag: add SetHelpOutput to specify the destination for help explicitly #41523

 
https://github.com/golang/go/issues/41523

一つ前のissueと関連して、-h / --help が明示的に指定された時にヘルプ出力先を標準出力に出せるようにするための提案

以上

ヘンリーではエンジニアを募集しています!

日本で唯一病院向けのクラウド型電子カルテ・レセコンシステムを開発・運営しており、日本のDXに向き合っています。

宣伝2

OSS活動を支援してくれると嬉しいです。