Finalize generated Go API
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- go
調査の方向性
Review the proposed Struct, Oneof, Array, and Multimap APIs in the issue body. Compare their behavior for primitive, non-primitive, optional, and dict-enabled values, then document whether the API should be accepted or changed. Done means a clear design decision is recorded; no files or tests are identified in the issue.
索引モデルが issue の本文から書いたものです。
説明
The API currently looks like this:
Struct
// Return value of “Field” of primitive type
S.Field() <type>
// Return pointer to “Field” of non-primitive type
// For dict-enabled types returned value is readonly.
S.Field() *<type>
// Set value of “Field” of primitive type
// For optional fields also sets the presence flag
S.SetField(val <type>)
// Set value of “Field” of dict-enabled non-primitive type
// For optional fields also sets the presence flag
S.SetField(val *<type>)
// Check if an optional “Field” is present
S.HasField() bool
// Unset presence flag for an optional “Field”
S.UnsetField()
Oneof
// Return the type of the current choice in oneof
S.Type() <int-type>
// Return value of primitive type, assuming the current choice
// of oneof is “Field”.
S.Field() <type>
// Return pointer to non-primitive type, assuming the current choice
// of oneof is “Field”.
// For dict-enabled types returned value is readonly.
S.Field() *<type>
// Set value of primitive type. Sets the choice of oneof to “Field”
// For optional fields also sets the presence flag
S.SetField(val <type>)
// Set value of dict-enabled non-primitive type by pointer.
// Sets the choice of oneof to “Field”
S.SetField(val *<type>)
Array
// Return number of elements
A.Len()
// Return element at index i (primitive type).
// Panics if index is out of range.
A.At(i int) <type>
// Set element at index i (primitive type)
// Panics if index is out of range.
A.SetAt(i int, val <type>)
// Return element at index i (non-primitive type)
// Panics if index is out of range.
// For dict-enabled types returned value is readonly.
A.At(i) *<type>
// Set element at index i (dict-enabled, non-primitive type)
// Panics if index is out of range.
A.SetAt(i int, val *<type>)
// Set length of the array. If array length grows, new elements
// are appended at the end in a zero-initialized state.
// For non-primitive types subsequent At() for new elements returns non-nil pointer.
A.EnsureLen(len int)
Multimap
// Return number of key-value pairs
M.Len()
// Return key-value pair at index i
M.At(i int) *<KeyValueType>
// Return key of the pair. Returns a pointer for non-primitive types.
<KeyValueType>.Key() <type>
// Return value of the pair. Returns a pointer for non-primitive types.
<KeyValueType>.Value() <type>
// Set the key of the pair (primitive type)
<KeyValueType>.SetKey(key <type>)
// Set the key of the pair (dict-enabled non-primitive type).
<KeyValueType>.SetKey(key *<type>)
// Set the value of the pair (primitive type)
<KeyValueType>.SetValue(key <type>)
// Set the value of the pair (dict-enabled non-primitive type).
<KeyValueType>.SetValue(key *<type>)
// Set length of the multimap. If the length grows, new key-value pairs
// are appended at the end in a zero-initialized state.
// For non-primitive types subsequent At() for new key-value pairs return
// non-nil pointer.
M.EnsureLen(len int)
We want to review and decide if this is the desirable API or we want to change it.
- 主要言語
- Java
- スター
- 11
- フォーク
- 6
- 平均マージ
- 55分
- マージ済み PR(30日)
- 1
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
splunk/stef のほかの issue
-
bug Go
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
-
bug Go help wanted
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
-
spec
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
checkstyle/checkstyle#21755 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
agentic-workflows
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
github/copilot-sdk#2782 ·
メンテナーはふだん 1 日以内に返信
-
documentation Good for newcomer quick win
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
CodeForPhilly/benefit-decision-toolkit#519 ·
メンテナーはふだん 1 日以内に返信
-
area-deployment triage:bot-seen triage:needs-human
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
microsoft/aspire#20533 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信