Kyoto.go #50 LT https://kyotogo.connpass.com/event/313309/
![Go製Webアプリケーションのエラーとの向き合い方大全、あるいはやっぱりスタックトレース欲しいやん / Kyoto.go #50](https://cdn-ak-scissors.b.st-hatena.com/image/square/e208ea799124715e27c4152859766abdb66e99c8/height=288;version=1;width=512/https%3A%2F%2Ffiles.speakerdeck.com%2Fpresentations%2F8a590e217dc3470ab50bd4a50b3a582e%2Fslide_0.jpg%3F29915952)
A common question developers new to Go have is “How do I organize my Go project?”, in terms of the layout of files and folders. The goal of this document is to provide some guidelines that will help answer this question. To make the most of this document, make sure you’re familiar with the basics of Go modules by reading the tutorial and managing module source. Go projects can include packages, co
概要 zero 識別子が追加されることが決まったので該当プロポーザルの spec: add untyped builtin zero · Issue #61372 · golang/go を読んで気になったことや実際の導入予定のzero識別子の仕様についてまとめました。1 提案時の仕様 spec: add untyped builtin zero · Issue #61372 · golang/go zero 識別子を追加する zero はどの型に対しても代入可能な zero value を表す (なので、ポインタ型と値型にも同じように代入可能で*x = zero と x = zero が許容される) 0, "", nil と比較できないような型Tの値であっても、zero と比較して zero value であるかを判定できる。Tがanyの場合も含む。 この zero 識別子を追加する提案
Russ Cox 14 August 2023 Go 1.21 includes new features to improve compatibility. Before you stop reading, I know that sounds boring. But boring can be good. Back in the early days of Go 1, Go was exciting and full of surprises. Each week we cut a new snapshot release and everyone got to roll the dice to see what we’d changed and how their programs would break. We released Go 1 and its compatibility
I’m sure we’re all in favour of “clean code”, but it’s one of those motherhood-and-apple-pie things that no one can reasonably disagree with. Who wants to write dirty code, unless maybe it’s for a porn site? The problem, of course, is that few of us can agree on what “clean code” means, and how to get there. A rule like “methods should only do one thing”, looks great on a T-shirt, but it’s not so
CLIツールをテストする難しさ ターミナルなどで動作するCLI(コマンドラインインタフェース)ツールは、パッケージを公開して利用してもらうライブラリと比べてテストがしにくいと感じる読者も多いでしょう。 CLIツールは、ファイル/標準入力からの入力や、ファイル/標準出力/標準エラー出力への出力があることが多いです。また、コマンドライン引数やオプション(フラグ)によって変わる挙動のパターンが多いため、網羅的なテストが大変です。 入出力についても単一のファイルを読み書きするだけではなく、ディレクトリごと作成したり、特定のディレクトリ以下を再帰的に読み込むような処理もよくあります。 main関数にすべての処理をすべて書くような作りのCLIツールだと、実際にビルドしてテストスクリプトなどから動かしてテストするしかありません。しかし、せっかくCLIツールをGoで書いているのであれば、テストもGoで書き
Go vulnerability database The Go vulnerability database (https://vuln.go.dev) is a comprehensive source of information about known vulnerabilities in importable packages in public Go modules. Vulnerability data comes from existing sources (such as CVEs and GHSAs) and direct reports from Go package maintainers. This information is then reviewed by the Go security team and added to the database. We
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く