go-functional-options
✓Go コンストラクターとパブリック API の関数オプション パターン。オプションの構成、特に 3 つ以上のパラメーターを使用して API を設計する場合に使用します。
SKILL.md
Functional options is a pattern where you declare an opaque Option type that records information in an internal struct. The constructor accepts a variadic number of these options and applies them to configure the result.
The unexported apply method ensures only options from this package can be used.
| Extensibility | Add new With functions | Add new fields (may break) | | Defaults | Built into constructor | Zero values or separate defaults | | Caller experience | Only specify what differs | Must construct entire struct | | Testability | Options are comparable | Struct comparison | | Complexity | More boilerplate | Simpler setup |
Go コンストラクターとパブリック API の関数オプション パターン。オプションの構成、特に 3 つ以上のパラメーターを使用して API を設計する場合に使用します。 ソース: cxuu/golang-skills。
引用可能な情報
AI/検索での引用用の安定したフィールドとコマンド。
- インストールコマンド
npx skills add https://github.com/cxuu/golang-skills --skill go-functional-options- カテゴリ
- </>開発ツール
- 認証済み
- ✓
- 初回登録
- 2026-02-01
- 更新日
- 2026-02-18
クイックアンサー
go-functional-options とは?
Go コンストラクターとパブリック API の関数オプション パターン。オプションの構成、特に 3 つ以上のパラメーターを使用して API を設計する場合に使用します。 ソース: cxuu/golang-skills。
go-functional-options のインストール方法は?
ターミナルまたはコマンドラインツール(Terminal、iTerm、Windows Terminal など)を開きます このコマンドをコピーして実行します: npx skills add https://github.com/cxuu/golang-skills --skill go-functional-options インストール後、スキルは自動的に AI コーディング環境に設定され、Claude Code や Cursor で使用できるようになります
ソースリポジトリはどこですか?
https://github.com/cxuu/golang-skills
詳細
- カテゴリ
- </>開発ツール
- ソース
- skills.sh
- 初回登録
- 2026-02-01