Skip to content

Commit b623e76

Browse files
hellovaitberman
andauthored
Add BETA support for go (#1744)
What does NOT work: * no docs * streaming is not yet functional * support for baml_options pending * support for streamstate * support for checks What does work: * calling functions * types passed in and out --------- Co-authored-by: Todd Berman <tberman@gmail.com>
1 parent cb740c9 commit b623e76

172 files changed

Lines changed: 38461 additions & 499 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
**/baml_client/inlinedbaml.py binary
22
**/baml_client/inlinedbaml.ts binary
33
**/baml_client/inlined.rb binary
4+
**/baml_client/inlinedbaml.go binary
45
**/baml_client/** merge=baml_client
56
**/baml_client/** linguist-generated=true

baml-cli/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
baml-cli

baml-cli/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# baml-cli
2+
3+
This exists only for go.
4+
5+
Go requires the folder to be named the same as the package name. To see instructions for other languages please see:
6+
[docs.boundaryml.com](https://docs.boundaryml.com/)

baml-cli/main.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package main
2+
3+
import (
4+
"os"
5+
6+
baml "github.com/boundaryml/baml/engine/language_client_go/pkg"
7+
)
8+
9+
func main() {
10+
// args from cli
11+
args := os.Args
12+
exit_code := baml.InvokeRuntimeCli(args)
13+
os.Exit(exit_code)
14+
}

0 commit comments

Comments
 (0)