Skip to content

Commit 46ad37b

Browse files
committed
Document NewMacro() properly
1 parent 4238cb2 commit 46ad37b

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

pkg/model/starlark/macro.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ type macro[TReference object.BasicReference, TMetadata model_core.ReferenceMetad
1717

1818
var _ EncodableValue[object.LocalReference, model_core.ReferenceMetadata] = (*macro[object.LocalReference, model_core.ReferenceMetadata])(nil)
1919

20+
// NewMacro creates a Starlark macro object. These are normally created
21+
// using the macro() function.
2022
func NewMacro[TReference object.BasicReference, TMetadata model_core.ReferenceMetadata]() starlark.Value {
2123
return macro[TReference, TMetadata]{}
2224
}

pkg/model/starlark/rule.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ var (
2929
_ NamedGlobal = (*rule[object.LocalReference, model_core.ReferenceMetadata])(nil)
3030
)
3131

32-
// NewRule creates a Starlark rule object.
32+
// NewRule creates a Starlark rule object. These are normally created
33+
// using the rule() function.
3334
func NewRule[TReference object.BasicReference, TMetadata model_core.ReferenceMetadata](identifier *pg_label.CanonicalStarlarkIdentifier, definition RuleDefinition[TReference, TMetadata]) starlark.Value {
3435
return &rule[TReference, TMetadata]{
3536
LateNamedValue: LateNamedValue{

0 commit comments

Comments
 (0)