Skip to content

Commit

Permalink
Add math starlark module (#202)
Browse files Browse the repository at this point in the history
  • Loading branch information
danlekko authored Jun 8, 2023
1 parent f33a60d commit 551b5bd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/star/compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"github.com/lekkodev/cli/pkg/metadata"
"github.com/pkg/errors"
"github.com/stripe/skycfg/go/protomodule"
"go.starlark.net/lib/math"
"go.starlark.net/starlark"
"go.starlark.net/starlarkstruct"
"go.starlark.net/starlarktest"
Expand Down Expand Up @@ -74,6 +75,7 @@ func (c *compiler) Compile(ctx context.Context, nv feature.NamespaceVersion) (*f
"feature": starlark.NewBuiltin("feature", makeFeature),
"proto": protoModule,
"struct": starlark.NewBuiltin("struct", starlarkstruct.Make),
"math": math.Module,
})
if err != nil {
return nil, errors.Wrap(err, "starlark execfile")
Expand Down

0 comments on commit 551b5bd

Please sign in to comment.