Skip to content

Commit 043ba77

Browse files
committed
added to gtrace util comment internals
1 parent c13c1ae commit 043ba77

File tree

12 files changed

+183
-0
lines changed

12 files changed

+183
-0
lines changed

internal/cmd/gtrace/writer.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ func (w *Writer) compose(trace *Trace) {
324324
w.line(`// Compose returns a new `, trace.Name, ` which has functional fields composed both from `,
325325
t, ` and `, x, `.`,
326326
)
327+
w.line(`// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals`)
327328
w.code(`func (`, t, ` *`, trace.Name, `) Compose(`, x, ` *`, trace.Name, `, opts ...`+trace.Name+`ComposeOption) `)
328329
w.line(`*`, trace.Name, ` {`)
329330
w.block(func() {
@@ -440,11 +441,13 @@ func (w *Writer) options(trace *Trace) {
440441
})
441442
w.newScope(func() {
442443
w.line(fmt.Sprintf(`// %sOption specified %s compose option`, trace.Name, trace.Name))
444+
w.line(`// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals`)
443445
w.line(fmt.Sprintf(`type %sComposeOption func(o *%sComposeOptions)`, trace.Name, unexported(trace.Name)))
444446
_ = w.bw.WriteByte('\n')
445447
})
446448
w.newScope(func() {
447449
w.line(fmt.Sprintf(`// With%sPanicCallback specified behavior on panic`, trace.Name))
450+
w.line(`// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals`)
448451
w.line(fmt.Sprintf(`func With%sPanicCallback(cb func(e interface{})) %sComposeOption {`, trace.Name, trace.Name))
449452
w.block(func() {
450453
w.line(fmt.Sprintf(`return func(o *%sComposeOptions) {`, unexported(trace.Name)))
@@ -641,6 +644,7 @@ func (w *Writer) hookShortcut(trace *Trace, hook Hook) {
641644

642645
w.newScope(func() {
643646
t := w.declare("t")
647+
w.line(`// Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals`)
644648
w.code(`func `, name)
645649
w.code(`(`)
646650
var ctx string

trace/coordination_gtrace.go

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

trace/discovery_gtrace.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)